diff options
| author | Joe Ludwig <[email protected]> | 2013-07-04 11:20:31 -0700 |
|---|---|---|
| committer | Joe Ludwig <[email protected]> | 2013-07-04 11:20:31 -0700 |
| commit | 77b376f8a0d8d172c51729762f80bb394534aa41 (patch) | |
| tree | 79897a015745704f7202eaa6648c18f2e5312df4 /mp/src/game/shared | |
| parent | Adding a CONTRIBUTING file so the rights that GitHub users grant to Valve wit... (diff) | |
| download | source-sdk-2013-77b376f8a0d8d172c51729762f80bb394534aa41.tar.xz source-sdk-2013-77b376f8a0d8d172c51729762f80bb394534aa41.zip | |
* Switched the SDK from checked-in projects to VPC, the Valve Project Creator. See the Getting Started document on the wiki for details.
* Pulled in bug fixes from HL2 and HL2MP.
Diffstat (limited to 'mp/src/game/shared')
| -rw-r--r-- | mp/src/game/shared/gamerules.h | 12 | ||||
| -rw-r--r-- | mp/src/game/shared/hl2mp/hl2mp_gamerules.cpp | 6 | ||||
| -rw-r--r-- | mp/src/game/shared/hl2mp/hl2mp_gamerules.h | 2 |
3 files changed, 14 insertions, 6 deletions
diff --git a/mp/src/game/shared/gamerules.h b/mp/src/game/shared/gamerules.h index 7564ca59..a8f4c35b 100644 --- a/mp/src/game/shared/gamerules.h +++ b/mp/src/game/shared/gamerules.h @@ -178,11 +178,13 @@ public: virtual void ClientCommandKeyValues( edict_t *pEntity, KeyValues *pKeyValues ) {}
- // IsConnectedUserInfoChangeAllowed allows to override FCVAR_NOT_CONNECTED rule when
- // player is on team spectator or team unassigned for example
- // Default and previous engine implementation will never allow FCVAR_NOT_CONNECTED cvars
- // to be changed while connected to a game server
- virtual bool IsConnectedUserInfoChangeAllowed( CBasePlayer *pPlayer ) { return !IsMultiplayer(); }
+ // IsConnectedUserInfoChangeAllowed allows the clients to change
+ // cvars with the FCVAR_NOT_CONNECTED rule if it returns true
+ virtual bool IsConnectedUserInfoChangeAllowed( CBasePlayer *pPlayer )
+ {
+ Assert( !IsMultiplayer() );
+ return true;
+ }
#ifdef CLIENT_DLL
diff --git a/mp/src/game/shared/hl2mp/hl2mp_gamerules.cpp b/mp/src/game/shared/hl2mp/hl2mp_gamerules.cpp index abb36cae..1b7cf70f 100644 --- a/mp/src/game/shared/hl2mp/hl2mp_gamerules.cpp +++ b/mp/src/game/shared/hl2mp/hl2mp_gamerules.cpp @@ -844,7 +844,11 @@ const char *CHL2MPRules::GetGameDescription( void ) return "Deathmatch";
}
-
+bool CHL2MPRules::IsConnectedUserInfoChangeAllowed( CBasePlayer *pPlayer )
+{
+ return true;
+}
+
float CHL2MPRules::GetMapRemainingTime()
{
// if timelimit is disabled, return 0
diff --git a/mp/src/game/shared/hl2mp/hl2mp_gamerules.h b/mp/src/game/shared/hl2mp/hl2mp_gamerules.h index 84f83999..8cadeab0 100644 --- a/mp/src/game/shared/hl2mp/hl2mp_gamerules.h +++ b/mp/src/game/shared/hl2mp/hl2mp_gamerules.h @@ -145,6 +145,8 @@ public: bool IsTeamplay( void ) { return m_bTeamPlayEnabled; }
void CheckAllPlayersReady( void );
+
+ virtual bool IsConnectedUserInfoChangeAllowed( CBasePlayer *pPlayer );
private:
|