]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fixed entities disappearing when partially submerged in water (it was a very stupid...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 7 Apr 2004 04:36:11 +0000 (04:36 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 7 Apr 2004 04:36:11 +0000 (04:36 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4088 d7cf8633-e32d-0410-b094-e92efae38249

sv_main.c

index 259eff80c6bb260f70b0cff85817c8b97eeb92a6..36a60709d270f4012ec46c081c3e78312e4670f6 100644 (file)
--- a/sv_main.c
+++ b/sv_main.c
@@ -959,9 +959,9 @@ void SV_MarkWriteEntityStateToClient(entity_state_t *s)
                        lightmins[0] = min(entmins[0], s->origin[0] - s->specialvisibilityradius);
                        lightmins[1] = min(entmins[1], s->origin[1] - s->specialvisibilityradius);
                        lightmins[2] = min(entmins[2], s->origin[2] - s->specialvisibilityradius);
-                       lightmaxs[0] = min(entmaxs[0], s->origin[0] + s->specialvisibilityradius);
-                       lightmaxs[1] = min(entmaxs[1], s->origin[1] + s->specialvisibilityradius);
-                       lightmaxs[2] = min(entmaxs[2], s->origin[2] + s->specialvisibilityradius);
+                       lightmaxs[0] = max(entmaxs[0], s->origin[0] + s->specialvisibilityradius);
+                       lightmaxs[1] = max(entmaxs[1], s->origin[1] + s->specialvisibilityradius);
+                       lightmaxs[2] = max(entmaxs[2], s->origin[2] + s->specialvisibilityradius);
                        sv_writeentitiestoclient_totalentities++;
                        // if not touching a visible leaf
                        if (sv_cullentities_pvs.integer && sv_writeentitiestoclient_pvsbytes && sv.worldmodel && sv.worldmodel->brush.BoxTouchingPVS && !sv.worldmodel->brush.BoxTouchingPVS(sv.worldmodel, sv_writeentitiestoclient_pvs, lightmins, lightmaxs))