mirror of
https://github.com/nillerusr/source-engine.git
synced 2026-08-31 22:49:19 +00:00
upload "kind" alien swarm
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
//========= Copyright Valve Corporation, All rights reserved. ============//
|
||||
//====== Copyright © 1996-2005, Valve Corporation, All rights reserved. =======
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
@@ -14,8 +14,6 @@
|
||||
#include "triggers.h"
|
||||
#include "team_control_point.h"
|
||||
|
||||
class CTeamTrainWatcher;
|
||||
|
||||
#define AREA_ATTEND_TIME 0.7f
|
||||
|
||||
#define AREA_THINK_TIME 0.1f
|
||||
@@ -32,19 +30,9 @@ 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
|
||||
//-----------------------------------------------------------------------------
|
||||
// This class is to get around the fact that DEFINE_FUNCTION doesn't like multiple inheritance
|
||||
class CTriggerAreaCaptureShim : public CBaseTrigger
|
||||
class CTriggerAreaCapture : public 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 );
|
||||
DECLARE_CLASS( CTriggerAreaCapture, CBaseTrigger );
|
||||
public:
|
||||
CTriggerAreaCapture();
|
||||
|
||||
@@ -55,17 +43,17 @@ public:
|
||||
|
||||
// A team has finished capturing the zone.
|
||||
virtual void OnEndCapture( int iTeam ) { return; }
|
||||
virtual void OnStartCapture( int iTeam ) { return; }
|
||||
|
||||
public:
|
||||
virtual void Spawn( void );
|
||||
virtual void Precache( void );
|
||||
virtual bool KeyValue( const char *szKeyName, const char *szValue );
|
||||
|
||||
void SetAreaIndex( int index );
|
||||
bool IsActive( void );
|
||||
bool CheckIfDeathCausesBlock( CBaseMultiplayerPlayer *pVictim, CBaseMultiplayerPlayer *pKiller );
|
||||
|
||||
void UpdateNumPlayers( bool bBlocked = false );
|
||||
void UpdateNumPlayers( void );
|
||||
void UpdateOwningTeam( void );
|
||||
void UpdateCappingTeam( int iTeam );
|
||||
void UpdateTeamInZone( void );
|
||||
@@ -80,20 +68,10 @@ public:
|
||||
|
||||
bool IsBlocked( void ) { return m_bBlocked; }
|
||||
|
||||
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:
|
||||
virtual void AreaTouch( CBaseEntity *pOther ) OVERRIDE;
|
||||
void StartTouch(CBaseEntity *pOther);
|
||||
void EXPORT AreaTouch( CBaseEntity *pOther );
|
||||
void EndTouch(CBaseEntity *pOther);
|
||||
void CaptureThink( void );
|
||||
|
||||
void StartCapture( int team, int capmode );
|
||||
@@ -115,8 +93,6 @@ private:
|
||||
void HandleRespawnTimeAdjustments( int oldTeam, int newTeam );
|
||||
void GetNumCappingPlayers( int team, int &numcappers, int *cappingplayers );
|
||||
|
||||
void SetNumCappers( int nNumCappers, bool bBlocked = false );
|
||||
|
||||
private:
|
||||
int m_iCapMode; //which capture mode we're in
|
||||
bool m_bCapturing;
|
||||
@@ -137,7 +113,6 @@ private:
|
||||
iBlockedTouching = 0;
|
||||
bCanCap = false;
|
||||
iSpawnAdjust = 0;
|
||||
iNumRequiredToStartCap = 0;
|
||||
}
|
||||
|
||||
int iNumRequiredToCap;
|
||||
@@ -145,7 +120,6 @@ private:
|
||||
int iBlockedTouching; // Number of capping players on the cap while it's being blocked
|
||||
bool bCanCap;
|
||||
int iSpawnAdjust;
|
||||
int iNumRequiredToStartCap;
|
||||
};
|
||||
CUtlVector<perteamdata_t> m_TeamData;
|
||||
|
||||
@@ -153,7 +127,6 @@ private:
|
||||
{
|
||||
CHandle<CBaseMultiplayerPlayer> hPlayer;
|
||||
int iCapAttemptNumber;
|
||||
float flNextBlockTime;
|
||||
};
|
||||
CUtlVector<blockers_t> m_Blockers;
|
||||
|
||||
@@ -171,7 +144,8 @@ private:
|
||||
COutputEvent m_CapOutput;
|
||||
|
||||
COutputInt m_OnNumCappersChanged;
|
||||
COutputInt m_OnNumCappersChanged2;
|
||||
|
||||
int m_iAreaIndex; //index of this area among all other areas
|
||||
|
||||
CHandle<CTeamControlPoint> m_hPoint; //the capture point that we are linked to!
|
||||
|
||||
@@ -180,9 +154,6 @@ private:
|
||||
string_t m_iszCapPointName; //name of the cap point that we're linked to
|
||||
|
||||
int m_iCapAttemptNumber; // number used to keep track of discrete cap attempts, for block tracking
|
||||
bool m_bStartTouch;
|
||||
|
||||
CHandle<CTeamTrainWatcher> m_hTrainWatcher; // used for train watchers that control train movement
|
||||
|
||||
DECLARE_DATADESC();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user