]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mutators/mutator/multijump/multijump.qc
Merged master.
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mutators / mutator / multijump / multijump.qc
index d6dc30cee4ec16d0ce8d4a3e899376ab6b429575..b00ad7475dbb882a3d754d1c607cf880627bceba 100644 (file)
@@ -1,4 +1,7 @@
-#ifdef IMPLEMENTATION
+#include "multijump.qh"
+
+#ifdef GAMEQC
+
 #ifdef SVQC
        #include <server/antilag.qh>
 #endif
@@ -79,7 +82,7 @@ MUTATOR_HOOKFUNCTION(multijump, PlayerJump)
                        if(M_ARGV(2, bool))
                        {
                                if(PHYS_MULTIJUMP_DODGING(player))
-                               if(player.movement_x != 0 || player.movement_y != 0) // don't remove all speed if player isnt pressing any movement keys
+                               if(PHYS_CS(player).movement_x != 0 || PHYS_CS(player).movement_y != 0) // don't remove all speed if player isnt pressing any movement keys
                                {
                                        float curspeed;
                                        vector wishvel, wishdir;
@@ -94,7 +97,7 @@ MUTATOR_HOOKFUNCTION(multijump, PlayerJump)
 //#endif
 
                                        makevectors(player.v_angle_y * '0 1 0');
-                                       wishvel = v_forward * player.movement_x + v_right * player.movement_y;
+                                       wishvel = v_forward * PHYS_CS(player).movement_x + v_right * PHYS_CS(player).movement_y;
                                        wishdir = normalize(wishvel);
 
                                        player.velocity_x = wishdir_x * curspeed; // allow "dodging" at a multijump
@@ -126,4 +129,5 @@ MUTATOR_HOOKFUNCTION(multijump, BuildMutatorsPrettyString)
 }
 
 #endif
+
 #endif