Enhance "endround" command (#319)

This commit is contained in:
Vaqtincha 2018-10-30 13:24:21 +05:00 committed by Dmitry Novikov
parent cc1f584a7f
commit 30c3586580

View File

@ -132,9 +132,23 @@ void GameDLL_Version_f()
void GameDLL_EndRound_f()
{
CSGameRules()->EndRoundMessage("#Round_Draw", ROUND_END_DRAW);
Broadcast("rounddraw");
CSGameRules()->TerminateRound(5, WINSTATUS_DRAW);
if (CMD_ARGC() == 2)
{
const char *pCmd = CMD_ARGV(1);
if (pCmd[0] == '1' || !Q_stricmp(pCmd, "T"))
{
CSGameRules()->OnRoundEnd_Intercept(WINSTATUS_TERRORISTS, ROUND_TERRORISTS_WIN, CSGameRules()->GetRoundRestartDelay());
return;
}
else if (pCmd[0] == '2' || !Q_stricmp(pCmd, "CT"))
{
CSGameRules()->OnRoundEnd_Intercept(WINSTATUS_CTS, ROUND_CTS_WIN, CSGameRules()->GetRoundRestartDelay());
return;
}
}
CSGameRules()->OnRoundEnd_Intercept(WINSTATUS_DRAW, ROUND_END_DRAW, CSGameRules()->GetRoundRestartDelay());
}
#endif // REGAMEDLL_ADD