From d99da515f7c21ca8136c5c0035ee5d49b06d24bf Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Sun, 25 Nov 2001 23:25:53 +0000 Subject: [PATCH] cl_ents.c: catch and moan about physents overlows (needs more work, but I don't grok the code well enough yet to do more). pmovetst.c: correct a spelling error --- qw/source/cl_ents.c | 10 ++++++++++ qw/source/pmovetst.c | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/qw/source/cl_ents.c b/qw/source/cl_ents.c index a58471c5a..afc3ef5b4 100644 --- a/qw/source/cl_ents.c +++ b/qw/source/cl_ents.c @@ -898,6 +898,11 @@ 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) @@ -998,6 +1003,11 @@ 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 diff --git a/qw/source/pmovetst.c b/qw/source/pmovetst.c index 4ddf11fe0..d342d6866 100644 --- a/qw/source/pmovetst.c +++ b/qw/source/pmovetst.c @@ -363,7 +363,7 @@ PM_PlayerMove (vec3_t start, vec3_t end) // trace.startsolid = true; VectorCopy (end, trace.endpos); - // trace a line through the apropriate clipping hull + // trace a line through the appropriate clipping hull PM_RecursiveHullCheck (hull, hull->firstclipnode, 0, 1, start_l, end_l, &trace);