@@ -341,7 +341,7 @@ static void SV_AddEntToSnapshot( svEntity_t *svEnt, sharedEntity_t *gEnt,
341341SV_AddEntitiesVisibleFromPoint
342342===============
343343*/
344- static void SV_AddEntitiesVisibleFromPoint ( vec3_t origin, clientSnapshot_t *frame,
344+ static void SV_AddEntitiesVisibleFromPoint ( client_t * client, vec3_t origin, clientSnapshot_t *frame,
345345// snapshotEntityNumbers_t *eNums, bool portal, clientSnapshot_t *oldframe, bool localClient ) {
346346// snapshotEntityNumbers_t *eNums, bool portal ) {
347347 snapshotEntityNumbers_t *eNums /* , bool portal, bool localClient */ )
@@ -379,7 +379,7 @@ static void SV_AddEntitiesVisibleFromPoint( vec3_t origin, clientSnapshot_t *fra
379379
380380 if ( playerEnt->r .svFlags & SVF_SELF_PORTAL )
381381 {
382- SV_AddEntitiesVisibleFromPoint ( playerEnt->s .origin2 , frame, eNums );
382+ SV_AddEntitiesVisibleFromPoint ( client, playerEnt->s .origin2 , frame, eNums );
383383 }
384384
385385 for ( e = 0 ; e < sv.num_entities ; e++ )
@@ -462,6 +462,11 @@ static void SV_AddEntitiesVisibleFromPoint( vec3_t origin, clientSnapshot_t *fra
462462 continue ;
463463 }
464464
465+ if ( ( ent->r .svFlags & SVF_BROADCAST_ONCE ) && !client->reliableAcknowledge ) {
466+ SV_AddEntToSnapshot ( svEnt, ent, eNums );
467+ continue ;
468+ }
469+
465470 // send entity if the client is in range
466471 if ( (ent->r .svFlags & SVF_CLIENTS_IN_RANGE) &&
467472 Distance ( ent->s .origin , playerEnt->s .origin ) <= ent->r .clientRadius )
@@ -637,7 +642,7 @@ static void SV_AddEntitiesVisibleFromPoint( vec3_t origin, clientSnapshot_t *fra
637642 }
638643
639644// SV_AddEntitiesVisibleFromPoint( ent->s.origin2, frame, eNums, true, oldframe, localClient );
640- SV_AddEntitiesVisibleFromPoint ( ent->s .origin2 , frame, eNums /* , true, localClient */ );
645+ SV_AddEntitiesVisibleFromPoint ( client, ent->s .origin2 , frame, eNums /* , true, localClient */ );
641646 }
642647
643648 continue ;
@@ -720,7 +725,7 @@ static void SV_BuildClientSnapshot( client_t *client )
720725
721726 // add all the entities directly visible to the eye, which
722727 // may include portal entities that merge other viewpoints
723- SV_AddEntitiesVisibleFromPoint ( org, frame, &entityNumbers /* , false, client->netchan.remoteAddress.type == NA_LOOPBACK */ );
728+ SV_AddEntitiesVisibleFromPoint ( client, org, frame, &entityNumbers /* , false, client->netchan.remoteAddress.type == NA_LOOPBACK */ );
724729
725730 // if there were portals visible, there may be out of order entities
726731 // in the list which will need to be resorted for the delta compression
0 commit comments