diff options
| author | Joe Ludwig <[email protected]> | 2013-07-17 18:26:59 -0700 |
|---|---|---|
| committer | Joe Ludwig <[email protected]> | 2013-07-17 18:26:59 -0700 |
| commit | e16ea21dc8a710237ade8413207f58d403c616a3 (patch) | |
| tree | 85dcfbda9881e4e022dedafefbc2727e2fd2aa59 /mp/src/game/server/team_objectiveresource.cpp | |
| parent | Merge pull request #36 from AnAkIn1/fogplayerparams_fix (diff) | |
| download | source-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/team_objectiveresource.cpp')
| -rw-r--r-- | mp/src/game/server/team_objectiveresource.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/mp/src/game/server/team_objectiveresource.cpp b/mp/src/game/server/team_objectiveresource.cpp index 9f8d0e7f..f7dd502e 100644 --- a/mp/src/game/server/team_objectiveresource.cpp +++ b/mp/src/game/server/team_objectiveresource.cpp @@ -61,7 +61,10 @@ IMPLEMENT_SERVERCLASS_ST_NOBASE(CBaseTeamObjectiveResource, DT_BaseTeamObjective SendPropArray3( SENDINFO_ARRAY3(m_iTeamInZone), SendPropInt( SENDINFO_ARRAY(m_iTeamInZone), 4, SPROP_UNSIGNED ) ),
SendPropArray3( SENDINFO_ARRAY3(m_bBlocked), SendPropInt( SENDINFO_ARRAY(m_bBlocked), 1, SPROP_UNSIGNED ) ),
SendPropArray3( SENDINFO_ARRAY3(m_iOwner), SendPropInt( SENDINFO_ARRAY(m_iOwner), 4, SPROP_UNSIGNED ) ),
+ SendPropArray3( SENDINFO_ARRAY3(m_bCPCapRateScalesWithPlayers), SendPropBool( SENDINFO_ARRAY(m_bCPCapRateScalesWithPlayers) ) ),
SendPropString( SENDINFO(m_pszCapLayoutInHUD) ),
+ SendPropFloat( SENDINFO( m_flCustomPositionX ) ),
+ SendPropFloat( SENDINFO( m_flCustomPositionY ) ),
END_SEND_TABLE()
@@ -72,6 +75,8 @@ BEGIN_DATADESC( CBaseTeamObjectiveResource ) DEFINE_FIELD( m_bPlayingMiniRounds, FIELD_BOOLEAN ),
DEFINE_FIELD( m_bControlPointsReset, FIELD_BOOLEAN ),
DEFINE_FIELD( m_iUpdateCapHudParity, FIELD_INTEGER ),
+ DEFINE_FIELD( m_flCustomPositionX, FIELD_FLOAT ),
+ DEFINE_FIELD( m_flCustomPositionY, FIELD_FLOAT ),
DEFINE_ARRAY( m_vCPPositions, FIELD_VECTOR, MAX_CONTROL_POINTS ),
DEFINE_ARRAY( m_bCPIsVisible, FIELD_INTEGER, MAX_CONTROL_POINTS ),
DEFINE_ARRAY( m_flLazyCapPerc, FIELD_FLOAT, MAX_CONTROL_POINTS ),
@@ -91,6 +96,7 @@ BEGIN_DATADESC( CBaseTeamObjectiveResource ) DEFINE_ARRAY( m_iTeamInZone, FIELD_INTEGER, MAX_CONTROL_POINTS ),
DEFINE_ARRAY( m_bBlocked, FIELD_BOOLEAN, MAX_CONTROL_POINTS ),
DEFINE_ARRAY( m_iOwner, FIELD_INTEGER, MAX_CONTROL_POINTS ),
+ DEFINE_ARRAY( m_bCPCapRateScalesWithPlayers, FIELD_BOOLEAN, MAX_CONTROL_POINTS ),
DEFINE_ARRAY( m_pszCapLayoutInHUD, FIELD_CHARACTER, MAX_CAPLAYOUT_LENGTH ),
DEFINE_ARRAY( m_flCapPercentages, FIELD_FLOAT, MAX_CONTROL_POINTS ),
DEFINE_ARRAY( m_iCPGroup, FIELD_INTEGER, MAX_CONTROL_POINTS ),
@@ -114,6 +120,8 @@ CBaseTeamObjectiveResource::CBaseTeamObjectiveResource() m_bPlayingMiniRounds = false;
m_iUpdateCapHudParity = 0;
m_bControlPointsReset = false;
+ m_flCustomPositionX = -1.f;
+ m_flCustomPositionY = -1.f;
}
//-----------------------------------------------------------------------------
@@ -153,6 +161,7 @@ void CBaseTeamObjectiveResource::Spawn( void ) m_bCPLocked.Set( i, false );
m_flUnlockTimes.Set( i, 0.0 );
m_flCPTimerTimes.Set( i, -1.0 );
+ m_bCPCapRateScalesWithPlayers.Set( i, true );
for ( int team = 0; team < MAX_CONTROL_POINT_TEAMS; team++ )
{
@@ -384,6 +393,15 @@ void CBaseTeamObjectiveResource::SetCPTimerTime( int index, float flTime ) //-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
+void CBaseTeamObjectiveResource::SetCPCapTimeScalesWithPlayers( int index, bool bScales )
+{
+ AssertValidIndex(index);
+ m_bCPCapRateScalesWithPlayers.Set( index, bScales );
+}
+
+//-----------------------------------------------------------------------------
+// Purpose:
+//-----------------------------------------------------------------------------
void CBaseTeamObjectiveResource::SetTeamCanCap( int index, int iTeam, bool bCanCap )
{
AssertValidIndex(index);
|