mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Merge pull request #8190 from furo321/fix-conflock
Fix broken rebase of `ConFlock`, rename previous remains of `team 0 mode`
This commit is contained in:
commit
96fa194f1c
|
@ -1050,7 +1050,7 @@ void CGameContext::AttemptJoinTeam(int ClientId, int Team)
|
||||||
SendChatTarget(pPlayer->GetCid(), "Practice mode enabled for your team, happy practicing!");
|
SendChatTarget(pPlayer->GetCid(), "Practice mode enabled for your team, happy practicing!");
|
||||||
|
|
||||||
if(m_pController->Teams().TeamFlock(Team))
|
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");
|
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;
|
CGameContext *pSelf = (CGameContext *)pUserData;
|
||||||
auto *pController = pSelf->m_pController;
|
auto *pController = pSelf->m_pController;
|
||||||
|
@ -1178,7 +1178,7 @@ void CGameContext::ConFlock(IConsole::IResult *pResult, void *pUserData)
|
||||||
{
|
{
|
||||||
pController->Teams().SetTeamFlock(Team, true);
|
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);
|
pSelf->SendChatTeam(Team, aBuf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3641,6 +3641,7 @@ void CGameContext::RegisterChatCommands()
|
||||||
Console()->Register("unlock", "", CFGFLAG_CHAT | CFGFLAG_SERVER, ConUnlock, this, "Unlock a team");
|
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("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("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("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");
|
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");
|
||||||
|
|
|
@ -445,7 +445,7 @@ private:
|
||||||
static void ConInvite(IConsole::IResult *pResult, void *pUserData);
|
static void ConInvite(IConsole::IResult *pResult, void *pUserData);
|
||||||
static void ConJoin(IConsole::IResult *pResult, void *pUserData);
|
static void ConJoin(IConsole::IResult *pResult, void *pUserData);
|
||||||
static void ConMode(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 ConMe(IConsole::IResult *pResult, void *pUserData);
|
||||||
static void ConWhisper(IConsole::IResult *pResult, void *pUserData);
|
static void ConWhisper(IConsole::IResult *pResult, void *pUserData);
|
||||||
static void ConConverse(IConsole::IResult *pResult, void *pUserData);
|
static void ConConverse(IConsole::IResult *pResult, void *pUserData);
|
||||||
|
|
Loading…
Reference in a new issue