]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sv_phys.c
- Removed Con_SafePrint and Con_SafePrintf since they now does the same things as...
[xonotic/darkplaces.git] / sv_phys.c
index c03cdb26a36ceba9099e45af558718e6fd041e9f..ee0239084cad2839d1bf1ad9229464e51337b3e8 100644 (file)
--- a/sv_phys.c
+++ b/sv_phys.c
@@ -592,13 +592,13 @@ void SV_PushMove (edict_t *pusher, float movetime)
                SV_LinkEdict (pusher, false);
                return;
        default:
-               Con_DPrintf("SV_PushMove: unrecognized solid type %f\n", pusher->v->solid);
+               Con_Printf("SV_PushMove: unrecognized solid type %f\n", pusher->v->solid);
                return;
        }
        index = (int) pusher->v->modelindex;
        if (index < 1 || index >= MAX_MODELS)
        {
-               Con_DPrintf("SV_PushMove: invalid modelindex %f\n", pusher->v->modelindex);
+               Con_Printf("SV_PushMove: invalid modelindex %f\n", pusher->v->modelindex);
                return;
        }
        pushermodel = sv.models[index];
@@ -1412,18 +1412,15 @@ void SV_Physics (void)
                if (pr_global_struct->force_retouch)
                        SV_LinkEdict (ent, true);       // force retouch even for stationary
 
-               if (i <= svs.maxclients)
+               if (i >= 1 && i <= svs.maxclients && svs.clients[i-1].spawned)
                {
-                       if (i > 0)
-                       {
-                               // connected slot
-                               // call standard client pre-think
-                               SV_CheckVelocity (ent);
-                               pr_global_struct->time = sv.time;
-                               pr_global_struct->self = EDICT_TO_PROG(ent);
-                               PR_ExecuteProgram (pr_global_struct->PlayerPreThink, "QC function PlayerPreThink is missing");
-                               SV_CheckVelocity (ent);
-                       }
+                       // connected slot
+                       // call standard client pre-think
+                       SV_CheckVelocity (ent);
+                       pr_global_struct->time = sv.time;
+                       pr_global_struct->self = EDICT_TO_PROG(ent);
+                       PR_ExecuteProgram (pr_global_struct->PlayerPreThink, "QC function PlayerPreThink is missing");
+                       SV_CheckVelocity (ent);
                }
                else if (sv_freezenonclients.integer)
                        continue;
@@ -1492,7 +1489,7 @@ void SV_Physics (void)
                        break;
                }
 
-               if (i <= svs.maxclients && i > 0 && !ent->e->free)
+               if (i >= 1 && i <= svs.maxclients && svs.clients[i-1].spawned)
                {
                        SV_CheckVelocity (ent);