mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2025-04-09 19:20:03 +03:00
Team Say refactory/enhancement (#1042)
Disable say_team when FFA mode is enabled Only for CT and T, Spectators can still use say_team
This commit is contained in:
parent
756deb1ea9
commit
6adb795fee
@ -841,6 +841,12 @@ void Host_Say(edict_t *pEntity, BOOL teamonly)
|
|||||||
char *pszConsoleFormat = nullptr;
|
char *pszConsoleFormat = nullptr;
|
||||||
bool consoleUsesPlaceName = false;
|
bool consoleUsesPlaceName = false;
|
||||||
|
|
||||||
|
#ifdef REGAMEDLL_ADD
|
||||||
|
// there's no team on FFA mode
|
||||||
|
if (teamonly && CSGameRules()->IsFreeForAll() && (pPlayer->m_iTeam == CT || pPlayer->m_iTeam == TERRORIST))
|
||||||
|
teamonly = FALSE;
|
||||||
|
#endif
|
||||||
|
|
||||||
// team only
|
// team only
|
||||||
if (teamonly)
|
if (teamonly)
|
||||||
{
|
{
|
||||||
@ -995,7 +1001,13 @@ void Host_Say(edict_t *pEntity, BOOL teamonly)
|
|||||||
if (gpGlobals->deathmatch != 0.0f && CSGameRules()->m_VoiceGameMgr.PlayerHasBlockedPlayer(pReceiver, pPlayer))
|
if (gpGlobals->deathmatch != 0.0f && CSGameRules()->m_VoiceGameMgr.PlayerHasBlockedPlayer(pReceiver, pPlayer))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (teamonly && pReceiver->m_iTeam != pPlayer->m_iTeam)
|
if (teamonly
|
||||||
|
#ifdef REGAMEDLL_FIXES
|
||||||
|
&& CSGameRules()->PlayerRelationship(pPlayer, pReceiver) != GR_TEAMMATE
|
||||||
|
#else
|
||||||
|
&& pReceiver->m_iTeam != pPlayer->m_iTeam
|
||||||
|
#endif
|
||||||
|
)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (
|
if (
|
||||||
@ -1008,7 +1020,13 @@ void Host_Say(edict_t *pEntity, BOOL teamonly)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((pReceiver->m_iIgnoreGlobalChat == IGNOREMSG_ENEMY && pReceiver->m_iTeam == pPlayer->m_iTeam)
|
if ((pReceiver->m_iIgnoreGlobalChat == IGNOREMSG_ENEMY
|
||||||
|
#ifdef REGAMEDLL_FIXES
|
||||||
|
&& CSGameRules()->PlayerRelationship(pPlayer, pReceiver) == GR_TEAMMATE
|
||||||
|
#else
|
||||||
|
&& pReceiver->m_iTeam == pPlayer->m_iTeam
|
||||||
|
#endif
|
||||||
|
)
|
||||||
|| pReceiver->m_iIgnoreGlobalChat == IGNOREMSG_NONE)
|
|| pReceiver->m_iIgnoreGlobalChat == IGNOREMSG_NONE)
|
||||||
{
|
{
|
||||||
MESSAGE_BEGIN(MSG_ONE, gmsgSayText, nullptr, pReceiver->pev);
|
MESSAGE_BEGIN(MSG_ONE, gmsgSayText, nullptr, pReceiver->pev);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user