mirror of
https://github.com/ddnet/ddnet.git
synced 2024-09-20 09:34:19 +00:00
Style fixes
This commit is contained in:
parent
4afe62a596
commit
73aea2426b
|
@ -142,10 +142,10 @@ void CGameContext::ConSettings(IConsole::IResult *pResult, void *pUserData)
|
||||||
{
|
{
|
||||||
str_format(aBuf, sizeof(aBuf), "%s %s",
|
str_format(aBuf, sizeof(aBuf), "%s %s",
|
||||||
g_Config.m_SvTeam == 1 ?
|
g_Config.m_SvTeam == 1 ?
|
||||||
"Teams are available on this server" :
|
"Teams are available on this server" :
|
||||||
(g_Config.m_SvTeam == 0 || g_Config.m_SvTeam == 3) ?
|
(g_Config.m_SvTeam == 0 || g_Config.m_SvTeam == 3) ?
|
||||||
"Teams are not available on this server" :
|
"Teams are not available on this server" :
|
||||||
"You have to be in a team to play on this server", /*g_Config.m_SvTeamStrict ? "and if you die in a team all of you die" : */
|
"You have to be in a team to play on this server", /*g_Config.m_SvTeamStrict ? "and if you die in a team all of you die" : */
|
||||||
"and all of your team will die if the team is locked");
|
"and all of your team will die if the team is locked");
|
||||||
pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "settings", aBuf);
|
pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "settings", aBuf);
|
||||||
}
|
}
|
||||||
|
@ -153,50 +153,50 @@ void CGameContext::ConSettings(IConsole::IResult *pResult, void *pUserData)
|
||||||
{
|
{
|
||||||
pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "settings",
|
pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "settings",
|
||||||
g_Config.m_SvTestingCommands ?
|
g_Config.m_SvTestingCommands ?
|
||||||
"Cheats are enabled on this server" :
|
"Cheats are enabled on this server" :
|
||||||
"Cheats are disabled on this server");
|
"Cheats are disabled on this server");
|
||||||
}
|
}
|
||||||
else if(str_comp(pArg, "collision") == 0)
|
else if(str_comp(pArg, "collision") == 0)
|
||||||
{
|
{
|
||||||
pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "settings",
|
pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "settings",
|
||||||
ColTemp ?
|
ColTemp ?
|
||||||
"Players can collide on this server" :
|
"Players can collide on this server" :
|
||||||
"Players can't collide on this server");
|
"Players can't collide on this server");
|
||||||
}
|
}
|
||||||
else if(str_comp(pArg, "hooking") == 0)
|
else if(str_comp(pArg, "hooking") == 0)
|
||||||
{
|
{
|
||||||
pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "settings",
|
pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "settings",
|
||||||
HookTemp ?
|
HookTemp ?
|
||||||
"Players can hook each other on this server" :
|
"Players can hook each other on this server" :
|
||||||
"Players can't hook each other on this server");
|
"Players can't hook each other on this server");
|
||||||
}
|
}
|
||||||
else if(str_comp(pArg, "endlesshooking") == 0)
|
else if(str_comp(pArg, "endlesshooking") == 0)
|
||||||
{
|
{
|
||||||
pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "settings",
|
pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "settings",
|
||||||
g_Config.m_SvEndlessDrag ?
|
g_Config.m_SvEndlessDrag ?
|
||||||
"Players hook time is unlimited" :
|
"Players hook time is unlimited" :
|
||||||
"Players hook time is limited");
|
"Players hook time is limited");
|
||||||
}
|
}
|
||||||
else if(str_comp(pArg, "hitting") == 0)
|
else if(str_comp(pArg, "hitting") == 0)
|
||||||
{
|
{
|
||||||
pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "settings",
|
pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "settings",
|
||||||
g_Config.m_SvHit ?
|
g_Config.m_SvHit ?
|
||||||
"Players weapons affect others" :
|
"Players weapons affect others" :
|
||||||
"Players weapons has no affect on others");
|
"Players weapons has no affect on others");
|
||||||
}
|
}
|
||||||
else if(str_comp(pArg, "oldlaser") == 0)
|
else if(str_comp(pArg, "oldlaser") == 0)
|
||||||
{
|
{
|
||||||
pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "settings",
|
pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "settings",
|
||||||
g_Config.m_SvOldLaser ?
|
g_Config.m_SvOldLaser ?
|
||||||
"Lasers can hit you if you shot them and they pull you towards the bounce origin (Like DDRace Beta)" :
|
"Lasers can hit you if you shot them and they pull you towards the bounce origin (Like DDRace Beta)" :
|
||||||
"Lasers can't hit you if you shot them, and they pull others towards the shooter");
|
"Lasers can't hit you if you shot them, and they pull others towards the shooter");
|
||||||
}
|
}
|
||||||
else if(str_comp(pArg, "me") == 0)
|
else if(str_comp(pArg, "me") == 0)
|
||||||
{
|
{
|
||||||
pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "settings",
|
pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "settings",
|
||||||
g_Config.m_SvSlashMe ?
|
g_Config.m_SvSlashMe ?
|
||||||
"Players can use /me commands the famous IRC Command" :
|
"Players can use /me commands the famous IRC Command" :
|
||||||
"Players can't use the /me command");
|
"Players can't use the /me command");
|
||||||
}
|
}
|
||||||
else if(str_comp(pArg, "timeout") == 0)
|
else if(str_comp(pArg, "timeout") == 0)
|
||||||
{
|
{
|
||||||
|
@ -207,8 +207,8 @@ void CGameContext::ConSettings(IConsole::IResult *pResult, void *pUserData)
|
||||||
{
|
{
|
||||||
pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "settings",
|
pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "settings",
|
||||||
g_Config.m_SvVoteKick ?
|
g_Config.m_SvVoteKick ?
|
||||||
"Players can use Callvote menu tab to kick offenders" :
|
"Players can use Callvote menu tab to kick offenders" :
|
||||||
"Players can't use the Callvote menu tab to kick offenders");
|
"Players can't use the Callvote menu tab to kick offenders");
|
||||||
if(g_Config.m_SvVoteKick)
|
if(g_Config.m_SvVoteKick)
|
||||||
{
|
{
|
||||||
str_format(aBuf, sizeof(aBuf),
|
str_format(aBuf, sizeof(aBuf),
|
||||||
|
@ -216,23 +216,23 @@ void CGameContext::ConSettings(IConsole::IResult *pResult, void *pUserData)
|
||||||
|
|
||||||
pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "settings",
|
pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "settings",
|
||||||
g_Config.m_SvVoteKickBantime ?
|
g_Config.m_SvVoteKickBantime ?
|
||||||
aBuf :
|
aBuf :
|
||||||
"Players are just kicked and not banned if they get voted off");
|
"Players are just kicked and not banned if they get voted off");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(str_comp(pArg, "pause") == 0)
|
else if(str_comp(pArg, "pause") == 0)
|
||||||
{
|
{
|
||||||
pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "settings",
|
pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "settings",
|
||||||
g_Config.m_SvPauseable ?
|
g_Config.m_SvPauseable ?
|
||||||
"/spec will pause you and your tee will vanish" :
|
"/spec will pause you and your tee will vanish" :
|
||||||
"/spec will pause you but your tee will not vanish");
|
"/spec will pause you but your tee will not vanish");
|
||||||
}
|
}
|
||||||
else if(str_comp(pArg, "scores") == 0)
|
else if(str_comp(pArg, "scores") == 0)
|
||||||
{
|
{
|
||||||
pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "settings",
|
pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "settings",
|
||||||
g_Config.m_SvHideScore ?
|
g_Config.m_SvHideScore ?
|
||||||
"Scores are private on this server" :
|
"Scores are private on this server" :
|
||||||
"Scores are public on this server");
|
"Scores are public on this server");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -403,16 +403,16 @@ void CGameContext::ConTeamTop5(IConsole::IResult *pResult, void *pUserData)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const char *pRequestedName = (str_comp(pResult->GetString(0), "me") == 0) ?
|
const char *pRequestedName = (str_comp(pResult->GetString(0), "me") == 0) ?
|
||||||
pSelf->Server()->ClientName(pResult->m_ClientID) :
|
pSelf->Server()->ClientName(pResult->m_ClientID) :
|
||||||
pResult->GetString(0);
|
pResult->GetString(0);
|
||||||
pSelf->Score()->ShowTeamTop5(pResult->m_ClientID, pRequestedName, 0);
|
pSelf->Score()->ShowTeamTop5(pResult->m_ClientID, pRequestedName, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(pResult->NumArguments() == 2 && pResult->GetInteger(1) != 0)
|
else if(pResult->NumArguments() == 2 && pResult->GetInteger(1) != 0)
|
||||||
{
|
{
|
||||||
const char *pRequestedName = (str_comp(pResult->GetString(0), "me") == 0) ?
|
const char *pRequestedName = (str_comp(pResult->GetString(0), "me") == 0) ?
|
||||||
pSelf->Server()->ClientName(pResult->m_ClientID) :
|
pSelf->Server()->ClientName(pResult->m_ClientID) :
|
||||||
pResult->GetString(0);
|
pResult->GetString(0);
|
||||||
pSelf->Score()->ShowTeamTop5(pResult->m_ClientID, pRequestedName, pResult->GetInteger(1));
|
pSelf->Score()->ShowTeamTop5(pResult->m_ClientID, pRequestedName, pResult->GetInteger(1));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -461,16 +461,16 @@ void CGameContext::ConTimes(IConsole::IResult *pResult, void *pUserData)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const char *pRequestedName = (str_comp(pResult->GetString(0), "me") == 0) ?
|
const char *pRequestedName = (str_comp(pResult->GetString(0), "me") == 0) ?
|
||||||
pSelf->Server()->ClientName(pResult->m_ClientID) :
|
pSelf->Server()->ClientName(pResult->m_ClientID) :
|
||||||
pResult->GetString(0);
|
pResult->GetString(0);
|
||||||
pSelf->Score()->ShowTimes(pResult->m_ClientID, pRequestedName, pResult->GetInteger(1));
|
pSelf->Score()->ShowTimes(pResult->m_ClientID, pRequestedName, pResult->GetInteger(1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(pResult->NumArguments() == 2 && pResult->GetInteger(1) != 0)
|
else if(pResult->NumArguments() == 2 && pResult->GetInteger(1) != 0)
|
||||||
{
|
{
|
||||||
const char *pRequestedName = (str_comp(pResult->GetString(0), "me") == 0) ?
|
const char *pRequestedName = (str_comp(pResult->GetString(0), "me") == 0) ?
|
||||||
pSelf->Server()->ClientName(pResult->m_ClientID) :
|
pSelf->Server()->ClientName(pResult->m_ClientID) :
|
||||||
pResult->GetString(0);
|
pResult->GetString(0);
|
||||||
pSelf->Score()->ShowTimes(pResult->m_ClientID, pRequestedName, pResult->GetInteger(1));
|
pSelf->Score()->ShowTimes(pResult->m_ClientID, pRequestedName, pResult->GetInteger(1));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1034,8 +1034,8 @@ void CGameContext::ConJoinTeam(IConsole::IResult *pResult, void *pUserData)
|
||||||
{
|
{
|
||||||
pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "join",
|
pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "join",
|
||||||
g_Config.m_SvInvite ?
|
g_Config.m_SvInvite ?
|
||||||
"This team is locked using /lock. Only members of the team can unlock it using /lock." :
|
"This team is locked using /lock. Only members of the team can unlock it using /lock." :
|
||||||
"This team is locked using /lock. Only members of the team can invite you or unlock it using /lock.");
|
"This team is locked using /lock. Only members of the team can invite you or unlock it using /lock.");
|
||||||
}
|
}
|
||||||
else if(Team > 0 && Team < MAX_CLIENTS && pController->m_Teams.Count(Team) >= g_Config.m_SvTeamMaxSize)
|
else if(Team > 0 && Team < MAX_CLIENTS && pController->m_Teams.Count(Team) >= g_Config.m_SvTeamMaxSize)
|
||||||
{
|
{
|
||||||
|
@ -1130,8 +1130,8 @@ void CGameContext::ConSetEyeEmote(IConsole::IResult *pResult,
|
||||||
IConsole::OUTPUT_LEVEL_STANDARD,
|
IConsole::OUTPUT_LEVEL_STANDARD,
|
||||||
"emote",
|
"emote",
|
||||||
(pPlayer->m_EyeEmoteEnabled) ?
|
(pPlayer->m_EyeEmoteEnabled) ?
|
||||||
"You can now use the preset eye emotes." :
|
"You can now use the preset eye emotes." :
|
||||||
"You don't have any eye emotes, remember to bind some. (until you die)");
|
"You don't have any eye emotes, remember to bind some. (until you die)");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if(str_comp_nocase(pResult->GetString(0), "on") == 0)
|
else if(str_comp_nocase(pResult->GetString(0), "on") == 0)
|
||||||
|
@ -1144,8 +1144,8 @@ void CGameContext::ConSetEyeEmote(IConsole::IResult *pResult,
|
||||||
IConsole::OUTPUT_LEVEL_STANDARD,
|
IConsole::OUTPUT_LEVEL_STANDARD,
|
||||||
"emote",
|
"emote",
|
||||||
(pPlayer->m_EyeEmoteEnabled) ?
|
(pPlayer->m_EyeEmoteEnabled) ?
|
||||||
"You can now use the preset eye emotes." :
|
"You can now use the preset eye emotes." :
|
||||||
"You don't have any eye emotes, remember to bind some. (until you die)");
|
"You don't have any eye emotes, remember to bind some. (until you die)");
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGameContext::ConEyeEmote(IConsole::IResult *pResult, void *pUserData)
|
void CGameContext::ConEyeEmote(IConsole::IResult *pResult, void *pUserData)
|
||||||
|
|
|
@ -678,7 +678,7 @@ void CGameTeams::RequestTeamSwap(CPlayer *Player, CPlayer *TargetPlayer, int Tea
|
||||||
return;
|
return;
|
||||||
|
|
||||||
char aBuf[512];
|
char aBuf[512];
|
||||||
if (Player->m_ClientSwapID == TargetPlayer->GetCID())
|
if(Player->m_ClientSwapID == TargetPlayer->GetCID())
|
||||||
{
|
{
|
||||||
str_format(aBuf, sizeof(aBuf),
|
str_format(aBuf, sizeof(aBuf),
|
||||||
"%s has already requested to swap with %s.",
|
"%s has already requested to swap with %s.",
|
||||||
|
@ -728,7 +728,6 @@ void CGameTeams::SwapTeamCharacters(CPlayer *Player, CPlayer *TargetPlayer, int
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CSaveTee PrimarySavedTee;
|
CSaveTee PrimarySavedTee;
|
||||||
PrimarySavedTee.Save(Player->GetCharacter());
|
PrimarySavedTee.Save(Player->GetCharacter());
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue