]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix spiderbot referencing clientstate buttons
authorMario <mario@smbclan.net>
Tue, 1 Aug 2017 08:02:37 +0000 (18:02 +1000)
committerMario <mario@smbclan.net>
Tue, 1 Aug 2017 08:02:37 +0000 (18:02 +1000)
qcsrc/common/vehicles/vehicle/spiderbot.qc

index 79d938d2ef8c0fcba5b3676667ef506184242b23..93f479b14f3efb1f7e46f5cd7a5738d211fcfd4b 100644 (file)
@@ -123,9 +123,9 @@ bool spiderbot_frame(entity this, float dt)
                }
 
                if (!PHYS_INPUT_BUTTON_JUMP(this))
-                       PHYS_INPUT_BUTTON_JUMP(vehic) = false;
+                       vehic.button2 = false;
 
-               if((IS_ONGROUND(vehic)) && PHYS_INPUT_BUTTON_JUMP(this) && !PHYS_INPUT_BUTTON_JUMP(vehic) && vehic.tur_head.wait < time)
+               if((IS_ONGROUND(vehic)) && PHYS_INPUT_BUTTON_JUMP(this) && !vehic.button2 && vehic.tur_head.wait < time)
                {
                        sound (vehic, CH_TRIGGER_SINGLE, SND_VEH_SPIDERBOT_JUMP, VOL_VEHICLEENGINE, ATTEN_NORM);
                        //dprint("spiderbot_jump:", ftos(soundlength("vehicles/spiderbot_jump.wav")), "\n");
@@ -133,7 +133,7 @@ bool spiderbot_frame(entity this, float dt)
 
                        vehic.tur_head.wait = time + 2;
                        vehic.jump_delay = time + 2;
-                       PHYS_INPUT_BUTTON_JUMP(vehic) = true; // set spider's jump
+                       vehic.button2 = true; // set spider's jump
                        //PHYS_INPUT_BUTTON_JUMP(this) = false;
 
                        vector movefix = '0 0 0';