]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/cl_physics.qc
get rid of SUB_Null
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / cl_physics.qc
index 9364d729418fd8069328085b640160350c010790..3e2268d89748d1eb193892407968c8ee721f66a5 100644 (file)
@@ -875,6 +875,12 @@ void SV_PlayerPhysics()
 
        MUTATOR_CALLHOOK(PlayerPhysics);
 
+       if(self.player_blocked)
+       {
+               self.movement = '0 0 0';
+               self.disableclientprediction = 1;
+       }
+
        maxspd_mod = 1;
 
        swampspd_mod = 1;
@@ -882,25 +888,9 @@ void SV_PlayerPhysics()
                swampspd_mod = self.swamp_slowdown; //cvar("g_balance_swamp_moverate");
        }
 
-       // conveyors: check if we still convey stuff
-       float conveyor_broken = FALSE;
-       if(self.groundentity.classname == "func_conveyor")
-       if(self.groundentity.nextthink)
-       {
-               if(!WarpZoneLib_BoxTouchesBrush(self.absmin + '0 0 -1', self.absmax + '0 0 -1', self.groundentity, self))
-                       self.groundentity = world;
-       }
-       if(!self.groundentity)
-       {
-               tracebox(self.origin + '0 0 -1', self.mins, self.maxs, self.origin + '0 0 -1', MOVE_NORMAL, self);
-               if(trace_ent.classname == "func_conveyor")
-                       self.groundentity = trace_ent;
-       }
-
        // conveyors: first fix velocity
-       if(self.groundentity.classname == "func_conveyor")
-               if(self.groundentity.nextthink)
-                       self.velocity -= self.groundentity.movedir;
+       if(self.conveyor.state)
+               self.velocity -= self.conveyor.movedir;
 
        if(self.classname != "player")
        {
@@ -1084,7 +1074,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))
+       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);
@@ -1186,7 +1176,7 @@ void SV_PlayerPhysics()
        else if (self.flags & FL_ONGROUND)
        {
                // we get here if we ran out of ammo
-               if((self.items & IT_JETPACK) && self.BUTTON_HOOK && !(buttons_prev & 32))
+               if((self.items & IT_JETPACK) && self.BUTTON_HOOK && !(buttons_prev & 32) && self.ammo_fuel < 0.01)
                        sprint(self, "You don't have any fuel for the ^2Jetpack\n");
 
                // walking
@@ -1269,7 +1259,7 @@ void SV_PlayerPhysics()
        {
                float wishspeed0;
                // we get here if we ran out of ammo
-               if((self.items & IT_JETPACK) && self.BUTTON_HOOK && !(buttons_prev & 32))
+               if((self.items & IT_JETPACK) && self.BUTTON_HOOK && !(buttons_prev & 32) && self.ammo_fuel < 0.01)
                        sprint(self, "You don't have any fuel for the ^2Jetpack\n");
 
                if(maxspd_mod < 1)
@@ -1382,9 +1372,8 @@ void SV_PlayerPhysics()
                self.lastground = time;
 
        // conveyors: then break velocity again
-       if(self.groundentity.classname == "func_conveyor")
-               if(self.groundentity.nextthink)
-                       self.velocity += self.groundentity.movedir;
+       if(self.conveyor.state)
+               self.velocity += self.conveyor.movedir;
 
        self.lastflags = self.flags;
        self.lastclassname = self.classname;