]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/physics/movetypes/movetypes.qc
Make stepping up while jumping reliable
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / physics / movetypes / movetypes.qc
index 64a31cdbf4a4ef3a133f444147e3edef86513e8e..48aa9dd106ca24f744de5e5f66d2307c6550e127 100644 (file)
@@ -227,7 +227,8 @@ int _Movetype_FlyMove(entity this, float dt, bool applygravity, bool applystepno
                        }
 
                        // accept the new position if it made some progress...
-                       if(fabs(this.origin_x - org.x) >= 0.03125 || fabs(this.origin_y - org.y) >= 0.03125)
+                       // previously this checked if absolute distance >= 0.03125 which made stepping up unreliable
+                       if(this.origin_x - org.x || this.origin_y - org.y)
                        {
                                trace_endpos = this.origin;
                                time_left *= 1 - trace2_fraction;