From f3e89e5f6fe368eb07c09e06cda9428c6cbfbefd Mon Sep 17 00:00:00 2001 From: havoc Date: Wed, 18 May 2005 22:43:23 +0000 Subject: [PATCH] fix lingering tracers in nexuiz (among other possible problems) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5313 d7cf8633-e32d-0410-b094-e92efae38249 --- protocol.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/protocol.c b/protocol.c index 0f736110..a787f35e 100644 --- a/protocol.c +++ b/protocol.c @@ -2006,7 +2006,8 @@ void EntityFrame5_WriteFrame(sizebuf_t *msg, entityframe5_database_t *d, int num num++; } // all remaining entities are dead - for (;num < sv.num_edicts;num++) + // note: this must use sv.max_edicts, not sv.num_edicts, because sv.num_edicts can both increase and decrease, where as sv.max_edicts only increases (if sv.num_edicts is used, sometimes some entities are missed when the sv.num_edicts count goes back down after firing some shots) + for (;num < sv.max_edicts;num++) { if (CHECKPVSBIT(d->visiblebits, num)) { -- 2.39.2