]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/cl_physics.qc
Merge branch 'master' into Mario/buffs
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / cl_physics.qc
index edad6d63f845881338547c06bc59d2a4285a0ce7..7563cf5202214e39a6a272d47311397343a74108 100644 (file)
@@ -19,15 +19,19 @@ When you press the jump key
 */
 void PlayerJump (void)
 {
+       if(self.player_blocked)
+               return; // no jumping while blocked
+
        float doublejump = FALSE;
+       float mjumpheight = autocvar_sv_jumpvelocity;
 
        player_multijump = doublejump;
+       player_jumpheight = mjumpheight;
        if(MUTATOR_CALLHOOK(PlayerJump))
                return;
 
        doublejump = player_multijump;
-
-       float mjumpheight;
+       mjumpheight = player_jumpheight;
 
        if (autocvar_sv_doublejump)
        {
@@ -44,7 +48,6 @@ void PlayerJump (void)
                }
        }
 
-       mjumpheight = autocvar_sv_jumpvelocity;
        if (self.waterlevel >= WATERLEVEL_SWIMMING)
        {
                self.velocity_z = self.stat_sv_maxspeed * 0.7;
@@ -636,9 +639,7 @@ void SV_PlayerPhysics()
 
        maxspd_mod = 1;
        if(self.ballcarried)
-               if(g_nexball)
-                       maxspd_mod *= autocvar_g_nexball_basketball_carrier_highspeed;
-               else if(g_keepaway)
+               if(g_keepaway)
                        maxspd_mod *= autocvar_g_keepaway_ballcarrier_highspeed;
 
        maxspd_mod *= autocvar_g_movement_highspeed;
@@ -785,6 +786,12 @@ void SV_PlayerPhysics()
        if(time < self.ladder_time)
                self.disableclientprediction = 1;
 
+       if(time < self.spider_slowness)
+       {
+               self.stat_sv_maxspeed *= 0.5; // half speed while slow from spider
+               self.stat_sv_airspeedlimit_nonqw *= 0.5;
+       }
+
        MUTATOR_CALLHOOK(PlayerPhysics);
 
        if(self.player_blocked)