Skip to content

Commit 01c677e

Browse files
committed
Added piercing sight mask to make sure that Visor always get positions of other players
1 parent f2fd144 commit 01c677e

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

code/qcommon/g_public.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ typedef struct {
6262
// if SVF_CLIENTMASK is set, use as bitmask of clients to send to
6363
// (maxclients must be <= 32, up to the mod to enforce this)
6464
int singleClient;
65+
#if defined( QC )
66+
int piercingSightMask;
67+
#endif // QC
6568

6669
qboolean bmodel; // if false, assume an explicit mins / maxs bounding box
6770
// only set by trap_SetBrushModel

code/server/sv_snapshot.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,15 @@ static void SV_AddEntitiesVisibleFromPoint( const vec3_t origin,
368368
continue;
369369
}
370370

371+
#if defined( QC )
372+
if ( ent->s.number >= 0 && ent->s.number < MAX_CLIENTS &&
373+
( SV_GentityNum( frame->ps.clientNum )->r.piercingSightMask & ( 1 << ent->s.number ) ) )
374+
{
375+
SV_AddEntToSnapshot( svEnt, ent, eNums );
376+
continue;
377+
}
378+
#endif // QC
379+
371380
// broadcast entities are always sent
372381
if ( ent->r.svFlags & SVF_BROADCAST ) {
373382
SV_AddEntToSnapshot( svEnt, ent, eNums );

0 commit comments

Comments
 (0)