From 845ebcae1440fce3aa11ac77dddad9defd6517e5 Mon Sep 17 00:00:00 2001 From: Dexter Date: Tue, 5 Nov 2013 03:43:43 +0000 Subject: [PATCH] messing with built in location chat --- mp/src/game/shared/ff/ff_sh_gamerules.cpp | 16 +++++++++++----- mp/src/game/shared/ff/ff_sh_gamerules.h | 2 ++ 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/mp/src/game/shared/ff/ff_sh_gamerules.cpp b/mp/src/game/shared/ff/ff_sh_gamerules.cpp index ca43a958..5ef64c9d 100644 --- a/mp/src/game/shared/ff/ff_sh_gamerules.cpp +++ b/mp/src/game/shared/ff/ff_sh_gamerules.cpp @@ -1311,18 +1311,18 @@ const char *CFF_SH_Rules::GetChatFormat( bool bTeamOnly, CBasePlayer *pPlayer ) { if ( pPlayer->GetTeamNumber() == TEAM_SPECTATOR ) { - pszFormat = "HL2MP_Chat_Spec"; + pszFormat = "FF_Chat_Spec"; } else { const char *chatLocation = GetChatLocation( bTeamOnly, pPlayer ); if ( chatLocation && *chatLocation ) { - pszFormat = "HL2MP_Chat_Team_Loc"; + pszFormat = "FF_Chat_Team_Loc"; } else { - pszFormat = "HL2MP_Chat_Team"; + pszFormat = "FF_Chat_Team"; } } } @@ -1331,17 +1331,23 @@ const char *CFF_SH_Rules::GetChatFormat( bool bTeamOnly, CBasePlayer *pPlayer ) { if ( pPlayer->GetTeamNumber() != TEAM_SPECTATOR ) { - pszFormat = "HL2MP_Chat_All"; + pszFormat = "FF_Chat_All"; } else { - pszFormat = "HL2MP_Chat_AllSpec"; + pszFormat = "FF_Chat_AllSpec"; } } return pszFormat; } +const char *CFF_SH_Rules::GetChatLocation( bool bTeamOnly, CBasePlayer *pPlayer ) +{ + // TODO: + return "FF LUA LOCATION HERE"; +} + bool CFF_SH_Rules::IsSpawnPointValid( CBaseEntity *pSpot, CBasePlayer *pPlayer ) { if ( !pSpot || pSpot->GetLocalOrigin() == vec3_origin ) diff --git a/mp/src/game/shared/ff/ff_sh_gamerules.h b/mp/src/game/shared/ff/ff_sh_gamerules.h index 3c489a6b..f18bf2d7 100644 --- a/mp/src/game/shared/ff/ff_sh_gamerules.h +++ b/mp/src/game/shared/ff/ff_sh_gamerules.h @@ -136,6 +136,8 @@ public: void ManageObjectRelocation( void ); void CheckChatForReadySignal( CFF_SH_Player *pPlayer, const char *chatmsg ); const char *GetChatFormat( bool bTeamOnly, CBasePlayer *pPlayer ); + + virtual const char *GetChatLocation( bool bTeamOnly, CBasePlayer *pPlayer ); bool IsSpawnPointValid( CBaseEntity *pSpot, CBasePlayer *pPlayer ); void AddTeam( const char *pTeamName, const int iNum );