]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix velocity check for braking when bots are using the jetpack
authorterencehill <piuntn@gmail.com>
Sat, 23 Sep 2017 16:55:46 +0000 (18:55 +0200)
committerterencehill <piuntn@gmail.com>
Sat, 23 Sep 2017 16:55:46 +0000 (18:55 +0200)
qcsrc/server/bot/default/havocbot/havocbot.qc

index 2cbbbeec673c5662a1a1b577e5225171449d28da..3a44f0e8b60a5cfd0a0d210462021fccb127d2b0 100644 (file)
@@ -508,7 +508,7 @@ void havocbot_movetogoal(entity this)
                        if(d < db || d < 500)
                        {
                                // Brake
-                               if(fabs(this.velocity.x)>maxspeed*0.3)
+                               if(v > maxspeed * 0.3)
                                {
                                        CS(this).movement_x = dir * v_forward * -maxspeed;
                                        return;