]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sv_phys.c
moved r_shadow_ white and normal cubemaps to r_texture_
[xonotic/darkplaces.git] / sv_phys.c
index 59c02e1e804403b2ecb503c717f6f8a41ead2791..fa0101f3dfe59ab7a0b5817530b0c95f6140bb92 100644 (file)
--- a/sv_phys.c
+++ b/sv_phys.c
@@ -677,7 +677,7 @@ void SV_PushMove (edict_t *pusher, float movetime)
        num_moved = 0;
 
        numcheckentities = SV_EntitiesInBox(mins, maxs, MAX_EDICTS, checkentities);
-       for (e = 1;e < numcheckentities;e++)
+       for (e = 0;e < numcheckentities;e++)
        {
                check = checkentities[e];
                if (check->v->movetype == MOVETYPE_PUSH
@@ -692,7 +692,7 @@ void SV_PushMove (edict_t *pusher, float movetime)
                        if (!SV_ClipMoveToEntity(pusher, check->v->origin, check->v->mins, check->v->maxs, check->v->origin).startsolid)
                                continue;
 
-               if (forward[0] != 1) // quick way to check if any rotation is used
+               if (forward[0] != 1 || left[1] != 1) // quick way to check if any rotation is used
                {
                        VectorSubtract (check->v->origin, pusher->v->origin, org);
                        org2[0] = DotProduct (org, forward);
@@ -1357,7 +1357,7 @@ void SV_Physics_Step (edict_t *ent)
                SV_LinkEdict(ent, true);
 
                // just hit ground
-               if (hitsound && (int)ent->v->flags & FL_ONGROUND)
+               if (hitsound && (int)ent->v->flags & FL_ONGROUND && gamemode != GAME_NEXUIZ)
                        SV_StartSound(ent, 0, "demon/dland2.wav", 255, 1);
        }
 
@@ -1405,8 +1405,11 @@ void SV_Physics (void)
                if (pr_global_struct->force_retouch)
                        SV_LinkEdict (ent, true);       // force retouch even for stationary
 
-               if (i >= 1 && i <= svs.maxclients && svs.clients[i-1].spawned)
+               if (i >= 1 && i <= svs.maxclients)
                {
+                       // don't do physics on disconnected clients, FrikBot relies on this
+                       if (!svs.clients[i-1].spawned)
+                               continue;
                        // connected slot
                        // call standard client pre-think
                        SV_CheckVelocity (ent);
@@ -1484,7 +1487,7 @@ void SV_Physics (void)
                        break;
                }
 
-               if (i >= 1 && i <= svs.maxclients && svs.clients[i-1].spawned)
+               if (i >= 1 && i <= svs.maxclients)
                {
                        SV_CheckVelocity (ent);