]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix a use of cs.specialvisibilityradius before it was initialized (thanks to gcc...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 24 Oct 2005 05:55:21 +0000 (05:55 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 24 Oct 2005 05:55:21 +0000 (05:55 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5766 d7cf8633-e32d-0410-b094-e92efae38249

sv_main.c

index fe072186454d44b20d8c7ecfb917f13bcce0ae4a..73ddd1ef3b8ed7e14b8eb2a48be9f6723fdd9f57 100644 (file)
--- a/sv_main.c
+++ b/sv_main.c
@@ -570,7 +570,7 @@ void SV_PrepareEntitiesForSending(void)
                        if (effects & EF_STARDUST)
                                specialvisibilityradius = max(specialvisibilityradius, 100);
                }
-               if (e > svs.maxclients && (!modelindex && !cs.specialvisibilityradius))
+               if (e > svs.maxclients && (!modelindex && !specialvisibilityradius))
                        continue;
 
                cs = defaultstate;
@@ -681,12 +681,12 @@ void SV_PrepareEntitiesForSending(void)
                }
                if (specialvisibilityradius)
                {
-                       cullmins[0] = min(cullmins[0], cs.origin[0] - cs.specialvisibilityradius);
-                       cullmins[1] = min(cullmins[1], cs.origin[1] - cs.specialvisibilityradius);
-                       cullmins[2] = min(cullmins[2], cs.origin[2] - cs.specialvisibilityradius);
-                       cullmaxs[0] = max(cullmaxs[0], cs.origin[0] + cs.specialvisibilityradius);
-                       cullmaxs[1] = max(cullmaxs[1], cs.origin[1] + cs.specialvisibilityradius);
-                       cullmaxs[2] = max(cullmaxs[2], cs.origin[2] + cs.specialvisibilityradius);
+                       cullmins[0] = min(cullmins[0], cs.origin[0] - specialvisibilityradius);
+                       cullmins[1] = min(cullmins[1], cs.origin[1] - specialvisibilityradius);
+                       cullmins[2] = min(cullmins[2], cs.origin[2] - specialvisibilityradius);
+                       cullmaxs[0] = max(cullmaxs[0], cs.origin[0] + specialvisibilityradius);
+                       cullmaxs[1] = max(cullmaxs[1], cs.origin[1] + specialvisibilityradius);
+                       cullmaxs[2] = max(cullmaxs[2], cs.origin[2] + specialvisibilityradius);
                }
                if (!VectorCompare(cullmins, ent->priv.server->cullmins) || !VectorCompare(cullmaxs, ent->priv.server->cullmaxs))
                {