aboutsummaryrefslogtreecommitdiff
path: root/mp/src/game/server/trigger_area_capture.h
diff options
context:
space:
mode:
authorJoe Ludwig <[email protected]>2013-07-17 18:26:59 -0700
committerJoe Ludwig <[email protected]>2013-07-17 18:26:59 -0700
commite16ea21dc8a710237ade8413207f58d403c616a3 (patch)
tree85dcfbda9881e4e022dedafefbc2727e2fd2aa59 /mp/src/game/server/trigger_area_capture.h
parentMerge pull request #36 from AnAkIn1/fogplayerparams_fix (diff)
downloadsource-sdk-2013-e16ea21dc8a710237ade8413207f58d403c616a3.tar.xz
source-sdk-2013-e16ea21dc8a710237ade8413207f58d403c616a3.zip
* Added support for building shaders in your mod
* Added nav mesh support * fixed many warnings and misc bugs * Fixed the create*projects scripts in mp * Added a bunch of stuff to .gitignore
Diffstat (limited to 'mp/src/game/server/trigger_area_capture.h')
-rw-r--r--mp/src/game/server/trigger_area_capture.h27
1 files changed, 22 insertions, 5 deletions
diff --git a/mp/src/game/server/trigger_area_capture.h b/mp/src/game/server/trigger_area_capture.h
index e2e494c9..383f3fad 100644
--- a/mp/src/game/server/trigger_area_capture.h
+++ b/mp/src/game/server/trigger_area_capture.h
@@ -32,9 +32,19 @@ class CTeamTrainWatcher;
// Can either be capped by both teams at once, or just by one
// Time to capture and number of people required to capture are both passed by the mapper
//-----------------------------------------------------------------------------
-class CTriggerAreaCapture : public CBaseTrigger
+// This class is to get around the fact that DEFINE_FUNCTION doesn't like multiple inheritance
+class CTriggerAreaCaptureShim : public CBaseTrigger
{
- DECLARE_CLASS( CTriggerAreaCapture, CBaseTrigger );
+ virtual void AreaTouch( CBaseEntity *pOther ) = 0;
+public:
+ void Touch( CBaseEntity *pOther ) { return AreaTouch( pOther ) ; }
+};
+
+DECLARE_AUTO_LIST( ITriggerAreaCaptureAutoList );
+
+class CTriggerAreaCapture : public CTriggerAreaCaptureShim, public ITriggerAreaCaptureAutoList
+{
+ DECLARE_CLASS( CTriggerAreaCapture, CTriggerAreaCaptureShim );
public:
CTriggerAreaCapture();
@@ -73,10 +83,17 @@ public:
void SetTrainWatcher( CTeamTrainWatcher *pTrainWatcher ){ m_hTrainWatcher = pTrainWatcher; } // used for train watchers that control train movement
CTeamTrainWatcher *GetTrainWatcher( void ) const { return m_hTrainWatcher; }
+ virtual void StartTouch(CBaseEntity *pOther) OVERRIDE;
+ virtual void EndTouch(CBaseEntity *pOther) OVERRIDE;
+
+ float GetCapTime() const { return m_flCapTime; }
+
+protected:
+
+ virtual bool CaptureModeScalesWithPlayers() const;
+
private:
- void StartTouch(CBaseEntity *pOther);
- void EXPORT AreaTouch( CBaseEntity *pOther );
- void EndTouch(CBaseEntity *pOther);
+ virtual void AreaTouch( CBaseEntity *pOther ) OVERRIDE;
void CaptureThink( void );
void StartCapture( int team, int capmode );