aboutsummaryrefslogtreecommitdiff
path: root/mp/src/game/server/triggers.h
diff options
context:
space:
mode:
authorJohn Schoenick <[email protected]>2015-09-09 18:35:41 -0700
committerJohn Schoenick <[email protected]>2015-09-09 18:35:41 -0700
commit0d8dceea4310fde5706b3ce1c70609d72a38efdf (patch)
treec831ef32c2c801a5c5a80401736b52c7b5a528ec /mp/src/game/server/triggers.h
parentUpdated the SDK with the latest code from the TF and HL2 branches. (diff)
downloadsource-sdk-2013-master.tar.xz
source-sdk-2013-master.zip
Updated the SDK with the latest code from the TF and HL2 branches.HEADmaster
Diffstat (limited to 'mp/src/game/server/triggers.h')
-rw-r--r--mp/src/game/server/triggers.h22
1 files changed, 20 insertions, 2 deletions
diff --git a/mp/src/game/server/triggers.h b/mp/src/game/server/triggers.h
index 7695d08c..6ae7312f 100644
--- a/mp/src/game/server/triggers.h
+++ b/mp/src/game/server/triggers.h
@@ -68,6 +68,8 @@ public:
virtual bool PassesTriggerFilters(CBaseEntity *pOther);
virtual void StartTouch(CBaseEntity *pOther);
virtual void EndTouch(CBaseEntity *pOther);
+ virtual void StartTouchAll() {}
+ virtual void EndTouchAll() {}
bool IsTouching( CBaseEntity *pOther );
CBaseEntity *GetTouchedEntityOfType( const char *sClassName );
@@ -164,7 +166,21 @@ protected:
// Purpose: Hurts anything that touches it. If the trigger has a targetname,
// firing it will toggle state.
//-----------------------------------------------------------------------------
-class CTriggerHurt : public CBaseTrigger
+
+// This class is to get around the fact that DEFINE_FUNCTION doesn't like multiple inheritance
+class CTriggerHurtShim : public CBaseTrigger
+{
+ virtual void RadiationThink( void ) = 0;
+ virtual void HurtThink( void ) = 0;
+
+public:
+
+ void RadiationThinkShim( void ){ RadiationThink(); }
+ void HurtThinkShim( void ){ HurtThink(); }
+};
+
+DECLARE_AUTO_LIST( ITriggerHurtAutoList );
+class CTriggerHurt : public CTriggerHurtShim, public ITriggerHurtAutoList
{
public:
CTriggerHurt()
@@ -173,7 +189,7 @@ public:
m_flDamageCap = 20.0f;
}
- DECLARE_CLASS( CTriggerHurt, CBaseTrigger );
+ DECLARE_CLASS( CTriggerHurt, CTriggerHurtShim );
void Spawn( void );
void RadiationThink( void );
@@ -207,4 +223,6 @@ public:
CUtlVector<EHANDLE> m_hurtEntities;
};
+bool IsTakingTriggerHurtDamageAtPoint( const Vector &vecPoint );
+
#endif // TRIGGERS_H