mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2025-01-13 23:28:04 +03:00
AddToFullPack: Added more extra effect flags EF_OWNER_VISIBILITY/EF_OWNER_NO_VISIBILITY
This commit is contained in:
parent
2fcba6f35a
commit
69250cf2c1
@ -142,6 +142,8 @@
|
||||
#define EF_SNIPERLASER (1<<9) // sniper laser effect
|
||||
#define EF_FIBERCAMERA (1<<10) // fiber camera
|
||||
#define EF_FORCEVISIBILITY (1<<11) // force visibility
|
||||
#define EF_OWNER_VISIBILITY (1<<12) // visibility for owner
|
||||
#define EF_OWNER_NO_VISIBILITY (1<<13) // no visibility for owner
|
||||
|
||||
// entity flags
|
||||
#define EFLAG_SLERP 1 // do studio interpolation of this entity
|
||||
|
@ -4286,8 +4286,23 @@ bool CheckEntityRecentlyInPVS(int clientnum, int entitynum, float currenttime)
|
||||
|
||||
BOOL EXT_FUNC AddToFullPack(struct entity_state_s *state, int e, edict_t *ent, edict_t *host, int hostflags, BOOL player, unsigned char *pSet)
|
||||
{
|
||||
if ((ent->v.effects & EF_NODRAW) == EF_NODRAW && ent != host)
|
||||
return FALSE;
|
||||
if (ent != host)
|
||||
{
|
||||
if ((ent->v.effects & EF_NODRAW) == EF_NODRAW)
|
||||
return FALSE;
|
||||
|
||||
#ifdef REGAMEDLL_ADD
|
||||
if (ent->v.owner == host)
|
||||
{
|
||||
// the owner can't see this entity
|
||||
if ((ent->v.effects & EF_OWNER_NO_VISIBILITY) == EF_OWNER_NO_VISIBILITY)
|
||||
return FALSE;
|
||||
}
|
||||
// no one can't see this entity except the owner
|
||||
else if ((ent->v.effects & EF_OWNER_VISIBILITY) == EF_OWNER_VISIBILITY)
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!ent->v.modelindex || !STRING(ent->v.model))
|
||||
return FALSE;
|
||||
@ -4368,8 +4383,8 @@ BOOL EXT_FUNC AddToFullPack(struct entity_state_s *state, int e, edict_t *ent, e
|
||||
state->effects = ent->v.effects;
|
||||
|
||||
#ifdef REGAMEDLL_ADD
|
||||
// don't send unhandled custom bit to client
|
||||
state->effects &= ~EF_FORCEVISIBILITY;
|
||||
// don't send unhandled custom bits to client
|
||||
state->effects &= ~(EF_FORCEVISIBILITY | EF_OWNER_VISIBILITY | EF_OWNER_NO_VISIBILITY);
|
||||
|
||||
if (ent->v.skin == CONTENTS_LADDER &&
|
||||
(host->v.iuser3 & PLAYER_PREVENT_CLIMB) == PLAYER_PREVENT_CLIMB) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user