]> 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 95c41d792f530c1ee83c646b3dcd87c3ac47b42a..7563cf5202214e39a6a272d47311397343a74108 100644 (file)
@@ -19,19 +19,20 @@ When you press the jump key
 */
 void PlayerJump (void)
 {
-       if(self.frozen)
-               return; // no jumping in freezetag when frozen
-               
+       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;
+       mjumpheight = player_jumpheight;
 
-       float mjumpheight;
-       
        if (autocvar_sv_doublejump)
        {
                tracebox(self.origin + '0 0 0.01', self.mins, self.maxs, self.origin - '0 0 0.01', MOVE_NORMAL, self);
@@ -47,7 +48,6 @@ void PlayerJump (void)
                }
        }
 
-       mjumpheight = autocvar_sv_jumpvelocity;
        if (self.waterlevel >= WATERLEVEL_SWIMMING)
        {
                self.velocity_z = self.stat_sv_maxspeed * 0.7;
@@ -113,7 +113,7 @@ void PlayerJump (void)
        self.flags &= ~FL_JUMPRELEASED;
 
        animdecide_setaction(self, ANIMACTION_JUMP, TRUE);
-       
+
        if(autocvar_g_jump_grunt)
                PlayerSound(playersound_jump, CH_PLAYER, VOICETYPE_PLAYERSOUND);
 
@@ -520,9 +520,9 @@ void PM_Accelerate(vector wishdir, float wishspeed, float wishspeed0, float acce
        }
        else
                vel_perpend = vel_perpend * max(0, 1 - frametime * wishspeed * sidefric);
-       
+
        vel_xy = vel_straight * wishdir + vel_perpend;
-       
+
        if(speedclamp >= 0)
        {
                float vel_xy_preclamp;
@@ -636,12 +636,10 @@ void SV_PlayerPhysics()
        string c;
 
        WarpZone_PlayerPhysics_FixVAngle();
-       
+
        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;
@@ -750,7 +748,7 @@ void SV_PlayerPhysics()
                        return;
                bot_think();
        }
-       
+
        self.items &= ~IT_USING_JETPACK;
 
        if(IS_PLAYER(self))
@@ -787,25 +785,12 @@ void SV_PlayerPhysics()
        self.disableclientprediction = 0;
        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;
        }
-               
-       if(self.frozen)
-       {
-               if(autocvar_sv_dodging_frozen && IS_REAL_CLIENT(self))
-               {
-                       self.movement_x = bound(-5, self.movement_x, 5);
-                       self.movement_y = bound(-5, self.movement_y, 5);
-                       self.movement_z = bound(-5, self.movement_z, 5);
-               }
-               else
-                       self.movement = '0 0 0';
-               self.disableclientprediction = 1;
-       }
 
        MUTATOR_CALLHOOK(PlayerPhysics);
 
@@ -1008,7 +993,7 @@ void SV_PlayerPhysics()
                        PM_Accelerate(wishdir, wishspeed, wishspeed, autocvar_sv_accelerate*maxspd_mod, 1, 0, 0, 0);
                }
        }
-       else if ((self.items & IT_JETPACK) && self.BUTTON_HOOK && (!autocvar_g_jetpack_fuel || self.ammo_fuel >= 0.01 || self.items & IT_UNLIMITED_WEAPON_AMMO) && !self.frozen)
+       else if ((self.items & IT_JETPACK) && self.BUTTON_HOOK && (!autocvar_g_jetpack_fuel || self.ammo_fuel >= 0.01 || self.items & IT_UNLIMITED_WEAPON_AMMO) && !self.freezetag_frozen)
        {
                //makevectors(self.v_angle_y * '0 1 0');
                makevectors(self.v_angle);