diff --git a/common/const.h b/common/const.h index aa081dc..a88b48e 100644 --- a/common/const.h +++ b/common/const.h @@ -660,14 +660,6 @@ // volume values #define VOL_NORM 1.0 -// plats -#define PLAT_LOW_TRIGGER 1 - -// Trains -#define SF_TRAIN_WAIT_RETRIGGER 1 -#define SF_TRAIN_START_ON 4 // Train is initially moving -#define SF_TRAIN_PASSABLE 8 // Train is not solid -- used to make water trains - // buttons #ifndef IN_BUTTONS_H #include "in_buttons.h" diff --git a/dlls/doors.h b/dlls/doors.h index d01df43..884b555 100644 --- a/dlls/doors.h +++ b/dlls/doors.h @@ -35,9 +35,9 @@ const float BUTTON_SOUNDWAIT = 0.5f; #define SF_DOOR_START_OPEN BIT(0) #define SF_DOOR_PASSABLE BIT(3) #define SF_DOOR_NO_AUTO_RETURN BIT(5) -#define SF_DOOR_USE_ONLY BIT(8) // door must be opened by player's use button. -#define SF_DOOR_TOUCH_ONLY_CLIENTS BIT(10) // Only clients can touch -#define SF_DOOR_ACTUALLY_WATER BIT(31) // This bit marks that func_door are actually func_water +#define SF_DOOR_USE_ONLY BIT(8) // door must be opened by player's use button. +#define SF_DOOR_TOUCH_ONLY_CLIENTS BIT(10) // Only clients can touch +#define SF_DOOR_ACTUALLY_WATER BIT(31) // This bit marks that func_door are actually func_water class CBaseDoor: public CBaseToggle { public: diff --git a/dlls/effects.h b/dlls/effects.h index 705b49d..8a73967 100644 --- a/dlls/effects.h +++ b/dlls/effects.h @@ -229,7 +229,7 @@ public: bool m_bSetModel; }; -#define SF_GIBSHOOTER_REPEATABLE BIT(0) +#define SF_GIBSHOOTER_REPEATABLE BIT(0) // Allows a gibshooter to be refired class CGibShooter: public CBaseDelay { public: @@ -294,9 +294,9 @@ public: void SetBloodAmount(float amount) { pev->dmg = amount; } }; -#define SF_SHAKE_EVERYONE BIT(0) -#define SF_SHAKE_DISRUPT BIT(1) -#define SF_SHAKE_INAIR BIT(2) +#define SF_SHAKE_EVERYONE BIT(0) // Don't check radius +#define SF_SHAKE_DISRUPT BIT(1) // Disrupt controls +#define SF_SHAKE_INAIR BIT(2) // Shake players in air class CShake: public CPointEntity { public: @@ -315,8 +315,8 @@ public: void SetRadius(float radius) { pev->dmg = radius; } }; -#define SF_FADE_IN BIT(0) -#define SF_FADE_MODULATE BIT(1) +#define SF_FADE_IN BIT(0) // Fade in, not out +#define SF_FADE_MODULATE BIT(1) // Modulate, don't blend #define SF_FADE_ONLYONE BIT(2) class CFade: public CPointEntity { @@ -343,7 +343,7 @@ public: virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value) = 0; }; -#define SF_FUNNEL_REVERSE BIT(0) +#define SF_FUNNEL_REVERSE BIT(0) // Funnel effect repels particles instead of attracting them class CEnvFunnel: public CBaseDelay { public: diff --git a/dlls/lights.h b/dlls/lights.h index 2d2a732..b35eed1 100644 --- a/dlls/lights.h +++ b/dlls/lights.h @@ -28,7 +28,7 @@ #pragma once -#define SF_LIGHT_START_OFF 1 +#define SF_LIGHT_START_OFF BIT(0) class CLight: public CPointEntity { public: diff --git a/dlls/maprules.h b/dlls/maprules.h index 95795eb..fd663fe 100644 --- a/dlls/maprules.h +++ b/dlls/maprules.h @@ -156,9 +156,9 @@ public: bool RemoveOnFire() const { return (pev->spawnflags & SF_PKILL_FIREONCE) == SF_PKILL_FIREONCE; } }; -#define SF_GAMECOUNT_FIREONCE BIT(0) // Remove entity after firing. -#define SF_GAMECOUNT_RESET BIT(1) // Reset entity Initial value after fired. -#define SF_GAMECOUNT_RESET BIT(2) // Fire a target when initial value is higher than limit value. +#define SF_GAMECOUNT_FIREONCE BIT(0) // Remove entity after firing. +#define SF_GAMECOUNT_RESET BIT(1) // Reset entity Initial value after fired. +#define SF_GAMECOUNT_OVER_LIMIT BIT(2) // Fire a target when initial value is higher than limit value. // Counts events and fires target class CGameCounter: public CRulePointEntity { @@ -175,7 +175,7 @@ public: int CountValue() const { return int(pev->frags); } int LimitValue() const { return int(pev->health); } - bool HitLimit() const { return CountValue() == LimitValue(); } + bool HitLimit() const { return ((pev->spawnflags & SF_GAMECOUNT_OVER_LIMIT) == SF_GAMECOUNT_OVER_LIMIT) ? (CountValue() >= LimitValue()) : (CountValue() == LimitValue()); } private: void SetCountValue(int value) { pev->frags = value; } diff --git a/dlls/plats.h b/dlls/plats.h index 754dfa2..3d318b7 100644 --- a/dlls/plats.h +++ b/dlls/plats.h @@ -80,6 +80,10 @@ public: Vector m_start; }; +#define SF_TRAIN_WAIT_RETRIGGER BIT(0) +#define SF_TRAIN_START_ON BIT(2) // Train is initially moving +#define SF_TRAIN_PASSABLE BIT(3) // Train is not solid -- used to make water trains + class CFuncTrain: public CBasePlatTrain { public: virtual void Spawn() = 0; diff --git a/dlls/weapons.h b/dlls/weapons.h index ae89c71..5decb54 100644 --- a/dlls/weapons.h +++ b/dlls/weapons.h @@ -61,7 +61,7 @@ const float MAX_DIST_RELOAD_SOUND = 512.0f; #define WEAPON_ACTIVITY_VOLUME 64 // spawn flags -#define SF_DETONATE 0x0001 // Grenades flagged with this will be triggered when the owner calls detonateSatchelCharges +#define SF_DETONATE BIT(0) // Grenades flagged with this will be triggered when the owner calls detonateSatchelCharges // custom enum enum ArmorType