Added new spawnflags for func_door - touch only clients

This commit is contained in:
s1lentq 2016-09-13 19:44:00 +07:00
parent 8633cd9f6f
commit 69b856a847
3 changed files with 7 additions and 0 deletions

View File

@ -421,6 +421,11 @@ void CBaseDoor::DoorTouch(CBaseEntity *pOther)
{
entvars_t *pevToucher = pOther->pev;
#ifdef REGAMEDLL_ADD
if ((pev->spawnflags & SF_DOOR_TOUCH_ONLY_CLIENTS) && !pOther->IsPlayer())
return;
#endif
// Ignore touches by dead players
if (pevToucher->deadflag != DEAD_NO)
return;

View File

@ -46,6 +46,7 @@
#define SF_DOOR_ROTATE_X 128
#define SF_DOOR_USE_ONLY 256 // door must be opened by player's use button.
#define SF_DOOR_NOMONSTERS 512 // Monster can't open
#define SF_DOOR_TOUCH_ONLY_CLIENTS 1024 // Only clients can touch
#define SF_DOOR_SILENT 0x80000000
class CBaseDoor: public CBaseToggle

View File

@ -41,6 +41,7 @@
#define SF_DOOR_ROTATE_X 128
#define SF_DOOR_USE_ONLY 256 // door must be opened by player's use button.
#define SF_DOOR_NOMONSTERS 512 // Monster can't open
#define SF_DOOR_TOUCH_ONLY_CLIENTS 1024 // Only clients can touch
#define SF_DOOR_SILENT 0x80000000
class CBaseDoor: public CBaseToggle {