]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix bots refusing to swim underwater
authorterencehill <piuntn@gmail.com>
Mon, 31 Jul 2017 12:52:06 +0000 (14:52 +0200)
committerterencehill <piuntn@gmail.com>
Mon, 31 Jul 2017 12:52:06 +0000 (14:52 +0200)
qcsrc/server/bot/default/havocbot/havocbot.qc

index 1c9c0a6247a74ae1a5fae5031a8447935733f1fe..221333fa2415f8bce0a45040c35efca267e3612f 100644 (file)
@@ -781,8 +781,10 @@ void havocbot_movetogoal(entity this)
                {
                        if(this.waterlevel>WATERLEVEL_SWIMMING)
                        {
-                               //flatdir_z = 1;
-                               this.aistatus |= AI_STATUS_OUT_WATER;
+                               if(!this.goalcurrent)
+                                       this.aistatus |= AI_STATUS_OUT_WATER;
+                               else if(gco.z > this.origin.z)
+                                       PHYS_INPUT_BUTTON_JUMP(this) = true;
                        }
                        else
                        {