]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mutators/mutator/bugrigs/bugrigs.qc
pow(a, b) -> a ** b
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mutators / mutator / bugrigs / bugrigs.qc
index a67e9455d9233640030bd1e0b879ff7b980ee0e8..729fbbad06b9ef459784e1d2f0f2d0ef5dfde471 100644 (file)
@@ -97,7 +97,7 @@ void RaceCarPhysics(entity this, float dt)
                float upspeed = this.velocity * v_up;
 
                // responsiveness factor for steering and acceleration
-               float f = 1 / (1 + pow(max(-myspeed, myspeed) / PHYS_BUGRIGS_SPEED_REF(this), PHYS_BUGRIGS_SPEED_POW(this)));
+               float f = 1 / (1 + (max(-myspeed, myspeed) / PHYS_BUGRIGS_SPEED_REF(this) ** PHYS_BUGRIGS_SPEED_POW(this)));
                //MAXIMA: f(v) := 1 / (1 + (v / PHYS_BUGRIGS_SPEED_REF(this)) ^ PHYS_BUGRIGS_SPEED_POW(this));
 
                float steerfactor;
@@ -154,7 +154,7 @@ void RaceCarPhysics(entity this, float dt)
                float myspeed = vlen(this.velocity);
 
                // responsiveness factor for steering and acceleration
-               float f = 1 / (1 + pow(max(0, myspeed / PHYS_BUGRIGS_SPEED_REF(this)), PHYS_BUGRIGS_SPEED_POW(this)));
+               float f = 1 / (1 + (max(0, myspeed / PHYS_BUGRIGS_SPEED_REF(this)) ** PHYS_BUGRIGS_SPEED_POW(this)));
                float steerfactor = -myspeed * f;
                this.angles_y += steer * dt * steerfactor; // apply steering