mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2025-01-14 15:48:01 +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_SNIPERLASER (1<<9) // sniper laser effect
|
||||||
#define EF_FIBERCAMERA (1<<10) // fiber camera
|
#define EF_FIBERCAMERA (1<<10) // fiber camera
|
||||||
#define EF_FORCEVISIBILITY (1<<11) // force visibility
|
#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
|
// entity flags
|
||||||
#define EFLAG_SLERP 1 // do studio interpolation of this entity
|
#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)
|
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)
|
if (ent != host)
|
||||||
return FALSE;
|
{
|
||||||
|
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))
|
if (!ent->v.modelindex || !STRING(ent->v.model))
|
||||||
return FALSE;
|
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;
|
state->effects = ent->v.effects;
|
||||||
|
|
||||||
#ifdef REGAMEDLL_ADD
|
#ifdef REGAMEDLL_ADD
|
||||||
// don't send unhandled custom bit to client
|
// don't send unhandled custom bits to client
|
||||||
state->effects &= ~EF_FORCEVISIBILITY;
|
state->effects &= ~(EF_FORCEVISIBILITY | EF_OWNER_VISIBILITY | EF_OWNER_NO_VISIBILITY);
|
||||||
|
|
||||||
if (ent->v.skin == CONTENTS_LADDER &&
|
if (ent->v.skin == CONTENTS_LADDER &&
|
||||||
(host->v.iuser3 & PLAYER_PREVENT_CLIMB) == PLAYER_PREVENT_CLIMB) {
|
(host->v.iuser3 & PLAYER_PREVENT_CLIMB) == PLAYER_PREVENT_CLIMB) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user