From 7fcac2adc25abe634ec583e91416cce5b092d4eb Mon Sep 17 00:00:00 2001 From: furo Date: Sun, 7 Apr 2024 11:58:04 +0200 Subject: [PATCH] Rename `/flock` to `/team0mode` --- src/game/server/ddracechat.cpp | 6 +++--- src/game/server/gamecontext.cpp | 1 + src/game/server/gamecontext.h | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/game/server/ddracechat.cpp b/src/game/server/ddracechat.cpp index 81b6062c9..f9d3aede7 100644 --- a/src/game/server/ddracechat.cpp +++ b/src/game/server/ddracechat.cpp @@ -1050,7 +1050,7 @@ void CGameContext::AttemptJoinTeam(int ClientId, int Team) SendChatTarget(pPlayer->GetCid(), "Practice mode enabled for your team, happy practicing!"); if(m_pController->Teams().TeamFlock(Team)) - SendChatTarget(pPlayer->GetCid(), "Team 0 mode enabled for your team, happy team 0-ing!"); + SendChatTarget(pPlayer->GetCid(), "Team 0 mode enabled for your team. This will make your team behave like team 0."); } } } @@ -1119,7 +1119,7 @@ void CGameContext::ConInvite(IConsole::IResult *pResult, void *pUserData) pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "chatresp", "Can't invite players to this team"); } -void CGameContext::ConFlock(IConsole::IResult *pResult, void *pUserData) +void CGameContext::ConTeam0Mode(IConsole::IResult *pResult, void *pUserData) { CGameContext *pSelf = (CGameContext *)pUserData; auto *pController = pSelf->m_pController; @@ -1178,7 +1178,7 @@ void CGameContext::ConFlock(IConsole::IResult *pResult, void *pUserData) { pController->Teams().SetTeamFlock(Team, true); - str_format(aBuf, sizeof(aBuf), "'%s' enabled team 0 mode.", pSelf->Server()->ClientName(pResult->m_ClientId)); + str_format(aBuf, sizeof(aBuf), "'%s' enabled team 0 mode. This will make your team behave like team 0.", pSelf->Server()->ClientName(pResult->m_ClientId)); pSelf->SendChatTeam(Team, aBuf); } } diff --git a/src/game/server/gamecontext.cpp b/src/game/server/gamecontext.cpp index b00ad3e7f..a4df35fd4 100644 --- a/src/game/server/gamecontext.cpp +++ b/src/game/server/gamecontext.cpp @@ -3641,6 +3641,7 @@ void CGameContext::RegisterChatCommands() Console()->Register("unlock", "", CFGFLAG_CHAT | CFGFLAG_SERVER, ConUnlock, this, "Unlock a team"); Console()->Register("invite", "r[player name]", CFGFLAG_CHAT | CFGFLAG_SERVER, ConInvite, this, "Invite a person to a locked team"); Console()->Register("join", "r[player name]", CFGFLAG_CHAT | CFGFLAG_SERVER, ConJoin, this, "Join the team of the specified player"); + Console()->Register("team0mode", "?i['0'|'1']", CFGFLAG_CHAT | CFGFLAG_SERVER, ConTeam0Mode, this, "Toggle team between team 0 and team mode. This mode will make your team will behave like team 0."); Console()->Register("showothers", "?i['0'|'1'|'2']", CFGFLAG_CHAT | CFGFLAG_SERVER, ConShowOthers, this, "Whether to show players from other teams or not (off by default), optional i = 0 for off, i = 1 for on, i = 2 for own team only"); Console()->Register("showall", "?i['0'|'1']", CFGFLAG_CHAT | CFGFLAG_SERVER, ConShowAll, this, "Whether to show players at any distance (off by default), optional i = 0 for off else for on"); diff --git a/src/game/server/gamecontext.h b/src/game/server/gamecontext.h index f3bd3a979..cd5bc157b 100644 --- a/src/game/server/gamecontext.h +++ b/src/game/server/gamecontext.h @@ -445,7 +445,7 @@ private: static void ConInvite(IConsole::IResult *pResult, void *pUserData); static void ConJoin(IConsole::IResult *pResult, void *pUserData); static void ConMode(IConsole::IResult *pResult, void *pUserData); - static void ConFlock(IConsole::IResult *pResult, void *pUserData); + static void ConTeam0Mode(IConsole::IResult *pResult, void *pUserData); static void ConMe(IConsole::IResult *pResult, void *pUserData); static void ConWhisper(IConsole::IResult *pResult, void *pUserData); static void ConConverse(IConsole::IResult *pResult, void *pUserData);