]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sv_phys.c
move developer_networkentities extern to protocol.h
[xonotic/darkplaces.git] / sv_phys.c
index 2bae3238dffca03227e9463f8de1e2eaf9a32848..83ba3545cc6b86601ef3388ba08e1837928fdd73 100644 (file)
--- a/sv_phys.c
+++ b/sv_phys.c
@@ -521,7 +521,7 @@ trace_t SV_PushEntity (edict_t *ent, vec3_t push, vec3_t pushangles)
        ent->v->angles[1] += trace.fraction * pushangles[1];
        SV_LinkEdict (ent, true);
 
-       if (trace.ent && (!((int)ent->v->flags & FL_ONGROUND) || ent->v->groundentity != EDICT_TO_PROG(trace.ent)))
+       if (trace.fraction < 1 && trace.ent && (!((int)ent->v->flags & FL_ONGROUND) || ent->v->groundentity != EDICT_TO_PROG(trace.ent)))
                SV_Impact (ent, trace.ent);
        return trace;
 }
@@ -1314,9 +1314,9 @@ void SV_Physics (void)
                if (pr_global_struct->force_retouch)
                        SV_LinkEdict (ent, true);       // force retouch even for stationary
 
-               if (i > 0 && i <= MAX_SCOREBOARD)
+               if (i > 0 && i <= svs.maxclients)
                {
-                       if (!svs.connectedclients[i-1] || !svs.connectedclients[i-1]->spawned)
+                       if (!svs.clients[i-1].spawned)
                                continue;
                        // connected slot
                        // call standard client pre-think
@@ -1349,7 +1349,7 @@ void SV_Physics (void)
                                VectorMA(ent->v->angles, sv.frametime, ent->v->avelocity, ent->v->angles);
                        }
                        // relink normal entities here, players always get relinked so don't relink twice
-                       if (!(i > 0 && i <= MAX_SCOREBOARD))
+                       if (!(i > 0 && i <= svs.maxclients))
                                SV_LinkEdict(ent, false);
                        break;
                case MOVETYPE_STEP:
@@ -1372,7 +1372,7 @@ void SV_Physics (void)
                        SV_Physics_Toss (ent);
                        break;
                case MOVETYPE_FLY:
-                       if (i > 0 && i <= MAX_SCOREBOARD)
+                       if (i > 0 && i <= svs.maxclients)
                        {
                                if (SV_RunThink (ent))
                                {
@@ -1388,7 +1388,7 @@ void SV_Physics (void)
                        break;
                }
 
-               if (i > 0 && i <= MAX_SCOREBOARD && !ent->e->free)
+               if (i > 0 && i <= svs.maxclients && !ent->e->free)
                {
                        SV_CheckVelocity (ent);