]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fix lingering tracers in nexuiz (among other possible problems)
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 18 May 2005 22:43:23 +0000 (22:43 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 18 May 2005 22:43:23 +0000 (22:43 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5313 d7cf8633-e32d-0410-b094-e92efae38249

protocol.c

index 0f736110ef553856388aadf57515f792cfe49bae..a787f35e70f0a99f03fac4d70b4c355951423954 100644 (file)
@@ -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))
                {