From 87d6278a8757735e76514f4ed5e108bfd879b3f5 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Mon, 26 Nov 2001 01:52:08 +0000 Subject: [PATCH] move the physent overflow tests to the correct locations --- qw/source/cl_ents.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/qw/source/cl_ents.c b/qw/source/cl_ents.c index afc3ef5b4..d30c3da6c 100644 --- a/qw/source/cl_ents.c +++ b/qw/source/cl_ents.c @@ -898,19 +898,24 @@ CL_SetSolidEntities (void) pak = &frame->packet_entities; for (i = 0; i < pak->num_entities; i++) { - if (pmove.numphysent == MAX_PHYSENTS) { - Con_Printf ("WARNING: entity physent overflow, email " - "quake-devel@lists.sourceforge.net\n"); - break; - } state = &pak->entities[i]; if (!state->modelindex) continue; if (!cl.model_precache[state->modelindex]) continue; + if (pmove.numphysent == MAX_PHYSENTS) { + Con_Printf ("WARNING: entity physent overflow, email " + "quake-devel@lists.sourceforge.net\n"); + break; + } if (cl.model_precache[state->modelindex]->hulls[1].firstclipnode || cl.model_precache[state->modelindex]->clipbox) { + if (pmove.numphysent == MAX_PHYSENTS) { + Con_Printf ("WARNING: entity physent overflow, email " + "quake-devel@lists.sourceforge.net\n"); + break; + } pmove.physents[pmove.numphysent].model = cl.model_precache[state->modelindex]; VectorCopy (state->origin, @@ -1003,12 +1008,6 @@ CL_SetSolidPlayers (int playernum) pent = pmove.physents + pmove.numphysent; for (j = 0, pplayer = predicted_players; j < MAX_CLIENTS; j++, pplayer++) { - if (pmove.numphysent == MAX_PHYSENTS) { - Con_Printf ("WARNING: player physent overflow, email " - "quake-devel@lists.sourceforge.net\n"); - break; - } - if (!pplayer->active) continue; // not present this frame @@ -1019,6 +1018,12 @@ CL_SetSolidPlayers (int playernum) if (pplayer->flags & PF_DEAD) continue; // dead players aren't solid + if (pmove.numphysent == MAX_PHYSENTS) { + Con_Printf ("WARNING: player physent overflow, email " + "quake-devel@lists.sourceforge.net\n"); + break; + } + pent->model = 0; VectorCopy (pplayer->origin, pent->origin); VectorCopy (player_mins, pent->mins);