diff --git a/src/engine/shared/protocol.h b/src/engine/shared/protocol.h index 859572f32..0777a0569 100644 --- a/src/engine/shared/protocol.h +++ b/src/engine/shared/protocol.h @@ -117,6 +117,7 @@ enum VERSION_DDNET_SWITCH = 15060, VERSION_DDNET_INDEPENDENT_SPECTATORS_TEAM = 16000, VERSION_DDNET_WEAPON_SHIELDS = 16010, + VERSION_DDNET_NEW_HUD = 16020, }; #endif diff --git a/src/game/server/entities/character.cpp b/src/game/server/entities/character.cpp index 36f439586..8c614900a 100644 --- a/src/game/server/entities/character.cpp +++ b/src/game/server/entities/character.cpp @@ -8,6 +8,7 @@ #include #include "character.h" +#include "engine/shared/protocol.h" #include "laser.h" #include "projectile.h" @@ -203,7 +204,7 @@ void CCharacter::HandleNinja() if(NinjaTime % Server()->TickSpeed() == 0 && NinjaTime / Server()->TickSpeed() <= 5) { - GameServer()->CreateDamageInd(m_Pos, 0, NinjaTime / Server()->TickSpeed(), TeamMask()); + GameServer()->CreateDamageInd(m_Pos, 0, NinjaTime / Server()->TickSpeed(), TeamMask(VERSION_DDNET_NEW_HUD)); } m_Armor = clamp(10 - (NinjaTime / 15), 0, 10); @@ -1440,7 +1441,7 @@ void CCharacter::HandleTiles(int Index) // hit others if(((m_TileIndex == TILE_HIT_DISABLE) || (m_TileFIndex == TILE_HIT_DISABLE)) && m_Hit != (DISABLE_HIT_GRENADE | DISABLE_HIT_HAMMER | DISABLE_HIT_LASER | DISABLE_HIT_SHOTGUN)) { - GameServer()->SendChatTarget(GetPlayer()->GetCID(), "You can't hit others"); + GameServer()->SendChatTarget(GetPlayer()->GetCID(), "You can't hit others", VERSION_DDNET_NEW_HUD); m_Hit = DISABLE_HIT_GRENADE | DISABLE_HIT_HAMMER | DISABLE_HIT_LASER | DISABLE_HIT_SHOTGUN; m_Core.m_NoShotgunHit = true; m_Core.m_NoGrenadeHit = true; @@ -1451,7 +1452,7 @@ void CCharacter::HandleTiles(int Index) } else if(((m_TileIndex == TILE_HIT_ENABLE) || (m_TileFIndex == TILE_HIT_ENABLE)) && m_Hit != HIT_ALL) { - GameServer()->SendChatTarget(GetPlayer()->GetCID(), "You can hit others"); + GameServer()->SendChatTarget(GetPlayer()->GetCID(), "You can hit others", VERSION_DDNET_NEW_HUD); m_Hit = HIT_ALL; m_Core.m_NoShotgunHit = false; m_Core.m_NoGrenadeHit = false; @@ -1464,14 +1465,14 @@ void CCharacter::HandleTiles(int Index) // collide with others if(((m_TileIndex == TILE_NPC_DISABLE) || (m_TileFIndex == TILE_NPC_DISABLE)) && !m_Core.m_NoCollision) { - GameServer()->SendChatTarget(GetPlayer()->GetCID(), "You can't collide with others"); + GameServer()->SendChatTarget(GetPlayer()->GetCID(), "You can't collide with others", VERSION_DDNET_NEW_HUD); m_Core.m_NoCollision = true; m_NeededFaketuning |= FAKETUNE_NOCOLL; GameServer()->SendTuningParams(m_pPlayer->GetCID(), m_TuneZone); // update tunings } else if(((m_TileIndex == TILE_NPC_ENABLE) || (m_TileFIndex == TILE_NPC_ENABLE)) && m_Core.m_NoCollision) { - GameServer()->SendChatTarget(GetPlayer()->GetCID(), "You can collide with others"); + GameServer()->SendChatTarget(GetPlayer()->GetCID(), "You can collide with others", VERSION_DDNET_NEW_HUD); m_Core.m_NoCollision = false; m_NeededFaketuning &= ~FAKETUNE_NOCOLL; GameServer()->SendTuningParams(m_pPlayer->GetCID(), m_TuneZone); // update tunings @@ -1480,14 +1481,14 @@ void CCharacter::HandleTiles(int Index) // hook others if(((m_TileIndex == TILE_NPH_DISABLE) || (m_TileFIndex == TILE_NPH_DISABLE)) && !m_Core.m_NoHookHit) { - GameServer()->SendChatTarget(GetPlayer()->GetCID(), "You can't hook others"); + GameServer()->SendChatTarget(GetPlayer()->GetCID(), "You can't hook others", VERSION_DDNET_NEW_HUD); m_Core.m_NoHookHit = true; m_NeededFaketuning |= FAKETUNE_NOHOOK; GameServer()->SendTuningParams(m_pPlayer->GetCID(), m_TuneZone); // update tunings } else if(((m_TileIndex == TILE_NPH_ENABLE) || (m_TileFIndex == TILE_NPH_ENABLE)) && m_Core.m_NoHookHit) { - GameServer()->SendChatTarget(GetPlayer()->GetCID(), "You can hook others"); + GameServer()->SendChatTarget(GetPlayer()->GetCID(), "You can hook others", VERSION_DDNET_NEW_HUD); m_Core.m_NoHookHit = false; m_NeededFaketuning &= ~FAKETUNE_NOHOOK; GameServer()->SendTuningParams(m_pPlayer->GetCID(), m_TuneZone); // update tunings @@ -1496,7 +1497,7 @@ void CCharacter::HandleTiles(int Index) // unlimited air jumps if(((m_TileIndex == TILE_UNLIMITED_JUMPS_ENABLE) || (m_TileFIndex == TILE_UNLIMITED_JUMPS_ENABLE)) && !m_SuperJump) { - GameServer()->SendChatTarget(GetPlayer()->GetCID(), "You have unlimited air jumps"); + GameServer()->SendChatTarget(GetPlayer()->GetCID(), "You have unlimited air jumps", VERSION_DDNET_NEW_HUD); m_SuperJump = true; m_Core.m_EndlessJump = true; if(m_Core.m_Jumps == 0) @@ -1507,7 +1508,7 @@ void CCharacter::HandleTiles(int Index) } else if(((m_TileIndex == TILE_UNLIMITED_JUMPS_DISABLE) || (m_TileFIndex == TILE_UNLIMITED_JUMPS_DISABLE)) && m_SuperJump) { - GameServer()->SendChatTarget(GetPlayer()->GetCID(), "You don't have unlimited air jumps"); + GameServer()->SendChatTarget(GetPlayer()->GetCID(), "You don't have unlimited air jumps", VERSION_DDNET_NEW_HUD); m_SuperJump = false; m_Core.m_EndlessJump = false; if(m_Core.m_Jumps == 0) @@ -1531,13 +1532,13 @@ void CCharacter::HandleTiles(int Index) // jetpack gun if(((m_TileIndex == TILE_JETPACK_ENABLE) || (m_TileFIndex == TILE_JETPACK_ENABLE)) && !m_Jetpack) { - GameServer()->SendChatTarget(GetPlayer()->GetCID(), "You have a jetpack gun"); + GameServer()->SendChatTarget(GetPlayer()->GetCID(), "You have a jetpack gun", VERSION_DDNET_NEW_HUD); m_Jetpack = true; m_Core.m_Jetpack = true; } else if(((m_TileIndex == TILE_JETPACK_DISABLE) || (m_TileFIndex == TILE_JETPACK_DISABLE)) && m_Jetpack) { - GameServer()->SendChatTarget(GetPlayer()->GetCID(), "You lost your jetpack gun"); + GameServer()->SendChatTarget(GetPlayer()->GetCID(), "You lost your jetpack gun", VERSION_DDNET_NEW_HUD); m_Jetpack = false; m_Core.m_Jetpack = false; } @@ -1558,34 +1559,34 @@ void CCharacter::HandleTiles(int Index) if(((m_TileIndex == TILE_TELE_GUN_ENABLE) || (m_TileFIndex == TILE_TELE_GUN_ENABLE)) && !m_Core.m_HasTelegunGun) { m_Core.m_HasTelegunGun = true; - GameServer()->SendChatTarget(GetPlayer()->GetCID(), "Teleport gun enabled"); + GameServer()->SendChatTarget(GetPlayer()->GetCID(), "Teleport gun enabled", VERSION_DDNET_NEW_HUD); } else if(((m_TileIndex == TILE_TELE_GUN_DISABLE) || (m_TileFIndex == TILE_TELE_GUN_DISABLE)) && m_Core.m_HasTelegunGun) { m_Core.m_HasTelegunGun = false; - GameServer()->SendChatTarget(GetPlayer()->GetCID(), "Teleport gun disabled"); + GameServer()->SendChatTarget(GetPlayer()->GetCID(), "Teleport gun disabled", VERSION_DDNET_NEW_HUD); } if(((m_TileIndex == TILE_TELE_GRENADE_ENABLE) || (m_TileFIndex == TILE_TELE_GRENADE_ENABLE)) && !m_Core.m_HasTelegunGrenade) { m_Core.m_HasTelegunGrenade = true; - GameServer()->SendChatTarget(GetPlayer()->GetCID(), "Teleport grenade enabled"); + GameServer()->SendChatTarget(GetPlayer()->GetCID(), "Teleport grenade enabled", VERSION_DDNET_NEW_HUD); } else if(((m_TileIndex == TILE_TELE_GRENADE_DISABLE) || (m_TileFIndex == TILE_TELE_GRENADE_DISABLE)) && m_Core.m_HasTelegunGrenade) { m_Core.m_HasTelegunGrenade = false; - GameServer()->SendChatTarget(GetPlayer()->GetCID(), "Teleport grenade disabled"); + GameServer()->SendChatTarget(GetPlayer()->GetCID(), "Teleport grenade disabled", VERSION_DDNET_NEW_HUD); } if(((m_TileIndex == TILE_TELE_LASER_ENABLE) || (m_TileFIndex == TILE_TELE_LASER_ENABLE)) && !m_Core.m_HasTelegunLaser) { m_Core.m_HasTelegunLaser = true; - GameServer()->SendChatTarget(GetPlayer()->GetCID(), "Teleport laser enabled"); + GameServer()->SendChatTarget(GetPlayer()->GetCID(), "Teleport laser enabled", VERSION_DDNET_NEW_HUD); } else if(((m_TileIndex == TILE_TELE_LASER_DISABLE) || (m_TileFIndex == TILE_TELE_LASER_DISABLE)) && m_Core.m_HasTelegunLaser) { m_Core.m_HasTelegunLaser = false; - GameServer()->SendChatTarget(GetPlayer()->GetCID(), "Teleport laser disabled"); + GameServer()->SendChatTarget(GetPlayer()->GetCID(), "Teleport laser disabled", VERSION_DDNET_NEW_HUD); } // stopper @@ -1660,7 +1661,7 @@ void CCharacter::HandleTiles(int Index) } else if(Collision()->GetSwitchType(MapIndex) == TILE_HIT_ENABLE && m_Hit & DISABLE_HIT_HAMMER && Collision()->GetSwitchDelay(MapIndex) == WEAPON_HAMMER) { - GameServer()->SendChatTarget(GetPlayer()->GetCID(), "You can hammer hit others"); + GameServer()->SendChatTarget(GetPlayer()->GetCID(), "You can hammer hit others", VERSION_DDNET_NEW_HUD); m_Hit &= ~DISABLE_HIT_HAMMER; m_NeededFaketuning &= ~FAKETUNE_NOHAMMER; m_Core.m_NoHammerHit = false; @@ -1668,7 +1669,7 @@ void CCharacter::HandleTiles(int Index) } else if(Collision()->GetSwitchType(MapIndex) == TILE_HIT_DISABLE && !(m_Hit & DISABLE_HIT_HAMMER) && Collision()->GetSwitchDelay(MapIndex) == WEAPON_HAMMER) { - GameServer()->SendChatTarget(GetPlayer()->GetCID(), "You can't hammer hit others"); + GameServer()->SendChatTarget(GetPlayer()->GetCID(), "You can't hammer hit others", VERSION_DDNET_NEW_HUD); m_Hit |= DISABLE_HIT_HAMMER; m_NeededFaketuning |= FAKETUNE_NOHAMMER; m_Core.m_NoHammerHit = true; @@ -1676,37 +1677,37 @@ void CCharacter::HandleTiles(int Index) } else if(Collision()->GetSwitchType(MapIndex) == TILE_HIT_ENABLE && m_Hit & DISABLE_HIT_SHOTGUN && Collision()->GetSwitchDelay(MapIndex) == WEAPON_SHOTGUN) { - GameServer()->SendChatTarget(GetPlayer()->GetCID(), "You can shoot others with shotgun"); + GameServer()->SendChatTarget(GetPlayer()->GetCID(), "You can shoot others with shotgun", VERSION_DDNET_NEW_HUD); m_Hit &= ~DISABLE_HIT_SHOTGUN; m_Core.m_NoShotgunHit = false; } else if(Collision()->GetSwitchType(MapIndex) == TILE_HIT_DISABLE && !(m_Hit & DISABLE_HIT_SHOTGUN) && Collision()->GetSwitchDelay(MapIndex) == WEAPON_SHOTGUN) { - GameServer()->SendChatTarget(GetPlayer()->GetCID(), "You can't shoot others with shotgun"); + GameServer()->SendChatTarget(GetPlayer()->GetCID(), "You can't shoot others with shotgun", VERSION_DDNET_NEW_HUD); m_Hit |= DISABLE_HIT_SHOTGUN; m_Core.m_NoShotgunHit = true; } else if(Collision()->GetSwitchType(MapIndex) == TILE_HIT_ENABLE && m_Hit & DISABLE_HIT_GRENADE && Collision()->GetSwitchDelay(MapIndex) == WEAPON_GRENADE) { - GameServer()->SendChatTarget(GetPlayer()->GetCID(), "You can shoot others with grenade"); + GameServer()->SendChatTarget(GetPlayer()->GetCID(), "You can shoot others with grenade", VERSION_DDNET_NEW_HUD); m_Hit &= ~DISABLE_HIT_GRENADE; m_Core.m_NoGrenadeHit = false; } else if(Collision()->GetSwitchType(MapIndex) == TILE_HIT_DISABLE && !(m_Hit & DISABLE_HIT_GRENADE) && Collision()->GetSwitchDelay(MapIndex) == WEAPON_GRENADE) { - GameServer()->SendChatTarget(GetPlayer()->GetCID(), "You can't shoot others with grenade"); + GameServer()->SendChatTarget(GetPlayer()->GetCID(), "You can't shoot others with grenade", VERSION_DDNET_NEW_HUD); m_Hit |= DISABLE_HIT_GRENADE; m_Core.m_NoGrenadeHit = true; } else if(Collision()->GetSwitchType(MapIndex) == TILE_HIT_ENABLE && m_Hit & DISABLE_HIT_LASER && Collision()->GetSwitchDelay(MapIndex) == WEAPON_LASER) { - GameServer()->SendChatTarget(GetPlayer()->GetCID(), "You can shoot others with laser"); + GameServer()->SendChatTarget(GetPlayer()->GetCID(), "You can shoot others with laser", VERSION_DDNET_NEW_HUD); m_Hit &= ~DISABLE_HIT_LASER; m_Core.m_NoLaserHit = false; } else if(Collision()->GetSwitchType(MapIndex) == TILE_HIT_DISABLE && !(m_Hit & DISABLE_HIT_LASER) && Collision()->GetSwitchDelay(MapIndex) == WEAPON_LASER) { - GameServer()->SendChatTarget(GetPlayer()->GetCID(), "You can't shoot others with laser"); + GameServer()->SendChatTarget(GetPlayer()->GetCID(), "You can't shoot others with laser", VERSION_DDNET_NEW_HUD); m_Hit |= DISABLE_HIT_LASER; m_Core.m_NoLaserHit = true; } @@ -1727,8 +1728,7 @@ void CCharacter::HandleTiles(int Index) str_format(aBuf, sizeof(aBuf), "You can jump %d time", NewJumps); else str_format(aBuf, sizeof(aBuf), "You can jump %d times", NewJumps); - GameServer()->SendChatTarget(GetPlayer()->GetCID(), aBuf); - + GameServer()->SendChatTarget(GetPlayer()->GetCID(), aBuf, VERSION_DDNET_NEW_HUD); if(NewJumps == 0 && !m_SuperJump) { m_NeededFaketuning |= FAKETUNE_NOJUMP; @@ -2001,7 +2001,7 @@ void CCharacter::DDRaceTick() { if(m_FreezeTime % Server()->TickSpeed() == Server()->TickSpeed() - 1 || m_FreezeTime == -1) { - GameServer()->CreateDamageInd(m_Pos, 0, (m_FreezeTime + 1) / Server()->TickSpeed(), TeamMask()); + GameServer()->CreateDamageInd(m_Pos, 0, (m_FreezeTime + 1) / Server()->TickSpeed(), TeamMask(VERSION_DDNET_NEW_HUD)); } if(m_FreezeTime > 0) m_FreezeTime--; @@ -2205,8 +2205,7 @@ void CCharacter::SetEndlessHook(bool Enable) { return; } - - GameServer()->SendChatTarget(GetPlayer()->GetCID(), Enable ? "Endless hook has been activated" : "Endless hook has been deactivated"); + GameServer()->SendChatTarget(GetPlayer()->GetCID(), Enable ? "Endless hook has been activated" : "Endless hook has been deactivated", VERSION_DDNET_NEW_HUD); m_EndlessHook = Enable; m_Core.m_EndlessHook = Enable; } @@ -2304,9 +2303,9 @@ void CCharacter::Rescue() } } -int64_t CCharacter::TeamMask() +int64_t CCharacter::TeamMask(int ExcludeClientVersionAndHigher) { - return Teams()->TeamMask(Team(), -1, GetPlayer()->GetCID()); + return Teams()->TeamMask(Team(), -1, GetPlayer()->GetCID(), ExcludeClientVersionAndHigher); } void CCharacter::SwapClients(int Client1, int Client2) diff --git a/src/game/server/entities/character.h b/src/game/server/entities/character.h index 7ea9e1c62..088ef1975 100644 --- a/src/game/server/entities/character.h +++ b/src/game/server/entities/character.h @@ -81,7 +81,7 @@ public: bool IsAlive() const { return m_Alive; } bool IsPaused() const { return m_Paused; } class CPlayer *GetPlayer() { return m_pPlayer; } - int64_t TeamMask(); + int64_t TeamMask(int ExcludeClientVersionAndHigher = -1); private: // player controlling this character diff --git a/src/game/server/gamecontext.cpp b/src/game/server/gamecontext.cpp index 2c4c2c27e..d84593762 100644 --- a/src/game/server/gamecontext.cpp +++ b/src/game/server/gamecontext.cpp @@ -389,7 +389,7 @@ void CGameContext::CallVote(int ClientID, const char *pDesc, const char *pCmd, c pPlayer->m_LastVoteCall = Now; } -void CGameContext::SendChatTarget(int To, const char *pText, int Flags) +void CGameContext::SendChatTarget(int To, const char *pText, int ExcludeClientVersionAndHigher, int Flags) { CNetMsg_Sv_Chat Msg; Msg.m_Team = 0; @@ -412,6 +412,11 @@ void CGameContext::SendChatTarget(int To, const char *pText, int Flags) } else { + if(ExcludeClientVersionAndHigher != -1 && Server()->GetClientVersion(To) >= ExcludeClientVersionAndHigher) + { + return; + } + if(!((Server()->IsSixup(To) && (Flags & CHAT_SIXUP)) || (!Server()->IsSixup(To) && (Flags & CHAT_SIX)))) return; diff --git a/src/game/server/gamecontext.h b/src/game/server/gamecontext.h index b4663aebe..abd804fce 100644 --- a/src/game/server/gamecontext.h +++ b/src/game/server/gamecontext.h @@ -222,7 +222,7 @@ public: // network void CallVote(int ClientID, const char *pDesc, const char *pCmd, const char *pReason, const char *pChatmsg, const char *pSixupDesc = 0); - void SendChatTarget(int To, const char *pText, int Flags = CHAT_SIX | CHAT_SIXUP); + void SendChatTarget(int To, const char *pText, int ExcludeClientVersionAndHigher = -1, int Flags = CHAT_SIX | CHAT_SIXUP); void SendChatTeam(int Team, const char *pText); void SendChat(int ClientID, int Team, const char *pText, int SpamProtectionClientID = -1, int Flags = CHAT_SIX | CHAT_SIXUP); void SendStartWarning(int ClientID, const char *pMessage); diff --git a/src/game/server/gamemodes/DDRace.cpp b/src/game/server/gamemodes/DDRace.cpp index 2cc972c8c..8a3be50c1 100644 --- a/src/game/server/gamemodes/DDRace.cpp +++ b/src/game/server/gamemodes/DDRace.cpp @@ -39,7 +39,7 @@ void CGameControllerDDRace::OnCharacterSpawn(CCharacter *pChr) void CGameControllerDDRace::HandleCharacterTiles(CCharacter *pChr, int MapIndex) { CPlayer *pPlayer = pChr->GetPlayer(); - int ClientID = pPlayer->GetCID(); + const int ClientID = pPlayer->GetCID(); int m_TileIndex = GameServer()->Collision()->GetTileIndex(MapIndex); int m_TileFIndex = GameServer()->Collision()->GetFTileIndex(MapIndex); @@ -105,12 +105,12 @@ void CGameControllerDDRace::HandleCharacterTiles(CCharacter *pChr, int MapIndex) // solo part if(((m_TileIndex == TILE_SOLO_ENABLE) || (m_TileFIndex == TILE_SOLO_ENABLE)) && !m_Teams.m_Core.GetSolo(ClientID)) { - GameServer()->SendChatTarget(ClientID, "You are now in a solo part"); + GameServer()->SendChatTarget(ClientID, "You are now in a solo part", VERSION_DDNET_NEW_HUD); pChr->SetSolo(true); } else if(((m_TileIndex == TILE_SOLO_DISABLE) || (m_TileFIndex == TILE_SOLO_DISABLE)) && m_Teams.m_Core.GetSolo(ClientID)) { - GameServer()->SendChatTarget(ClientID, "You are now out of the solo part"); + GameServer()->SendChatTarget(ClientID, "You are now out of the solo part", VERSION_DDNET_NEW_HUD); pChr->SetSolo(false); } } diff --git a/src/game/server/teams.cpp b/src/game/server/teams.cpp index 96b2c352b..b3e088686 100644 --- a/src/game/server/teams.cpp +++ b/src/game/server/teams.cpp @@ -473,7 +473,7 @@ bool CGameTeams::TeamFinished(int Team) return true; } -int64_t CGameTeams::TeamMask(int Team, int ExceptID, int Asker) +int64_t CGameTeams::TeamMask(int Team, int ExceptID, int Asker, int ExcludeClientVersionAndHigher) { int64_t Mask = 0; @@ -486,6 +486,8 @@ int64_t CGameTeams::TeamMask(int Team, int ExceptID, int Asker) continue; // Explicitly excluded if(!GetPlayer(i)) continue; // Player doesn't exist + if(ExcludeClientVersionAndHigher != -1 && GetPlayer(i)->GetClientVersion() >= ExcludeClientVersionAndHigher) + continue; // The player is excluded from this team mask because of his client version if(!(GetPlayer(i)->GetTeam() == TEAM_SPECTATORS || GetPlayer(i)->IsPaused())) { // Not spectator @@ -671,7 +673,7 @@ void CGameTeams::OnFinish(CPlayer *Player, float Time, const char *pTimestamp) Server()->ClientName(ClientID), (int)Time / 60, Time - ((int)Time / 60 * 60)); if(g_Config.m_SvHideScore || !g_Config.m_SvSaveWorseScores) - GameServer()->SendChatTarget(ClientID, aBuf, CGameContext::CHAT_SIX); + GameServer()->SendChatTarget(ClientID, aBuf, -1, CGameContext::CHAT_SIX); else GameServer()->SendChat(-1, CGameContext::CHAT_ALL, aBuf, -1., CGameContext::CHAT_SIX); @@ -689,9 +691,9 @@ void CGameTeams::OnFinish(CPlayer *Player, float Time, const char *pTimestamp) str_format(aBuf, sizeof(aBuf), "New record: %5.2f second(s) better.", Diff); if(g_Config.m_SvHideScore || !g_Config.m_SvSaveWorseScores) - GameServer()->SendChatTarget(ClientID, aBuf, CGameContext::CHAT_SIX); + GameServer()->SendChatTarget(ClientID, aBuf, -1, CGameContext::CHAT_SIX); else - GameServer()->SendChat(-1, CGameContext::CHAT_ALL, aBuf, CGameContext::CHAT_SIX); + GameServer()->SendChat(-1, CGameContext::CHAT_ALL, aBuf, -1, CGameContext::CHAT_SIX); } else if(pData->m_BestTime != 0) // tee has already finished? { @@ -711,7 +713,7 @@ void CGameTeams::OnFinish(CPlayer *Player, float Time, const char *pTimestamp) str_format(aBuf, sizeof(aBuf), "%5.2f second(s) worse, better luck next time.", Diff); - GameServer()->SendChatTarget(ClientID, aBuf, CGameContext::CHAT_SIX); // this is private, sent only to the tee + GameServer()->SendChatTarget(ClientID, aBuf, -1, CGameContext::CHAT_SIX); // this is private, sent only to the tee } } else diff --git a/src/game/server/teams.h b/src/game/server/teams.h index 581b838e7..6b86972cc 100644 --- a/src/game/server/teams.h +++ b/src/game/server/teams.h @@ -93,7 +93,7 @@ public: void ChangeTeamState(int Team, int State); - int64_t TeamMask(int Team, int ExceptID = -1, int Asker = -1); + int64_t TeamMask(int Team, int ExceptID = -1, int Asker = -1, int ExcludeClientVersionAndHigher = -1); int Count(int Team) const;