From 69b856a8478b99efb0d0317790051410d5f82826 Mon Sep 17 00:00:00 2001 From: s1lentq Date: Tue, 13 Sep 2016 19:44:00 +0700 Subject: [PATCH] Added new spawnflags for func_door - touch only clients --- regamedll/dlls/doors.cpp | 5 +++++ regamedll/dlls/doors.h | 1 + regamedll/extra/cssdk/dlls/doors.h | 1 + 3 files changed, 7 insertions(+) diff --git a/regamedll/dlls/doors.cpp b/regamedll/dlls/doors.cpp index 05776617..011c08f1 100644 --- a/regamedll/dlls/doors.cpp +++ b/regamedll/dlls/doors.cpp @@ -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; diff --git a/regamedll/dlls/doors.h b/regamedll/dlls/doors.h index 56ec961b..f4048a2e 100644 --- a/regamedll/dlls/doors.h +++ b/regamedll/dlls/doors.h @@ -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 diff --git a/regamedll/extra/cssdk/dlls/doors.h b/regamedll/extra/cssdk/dlls/doors.h index 92a97b48..43ef05db 100644 --- a/regamedll/extra/cssdk/dlls/doors.h +++ b/regamedll/extra/cssdk/dlls/doors.h @@ -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 {