Add end round command

This commit is contained in:
IgnacioDM 2016-03-02 20:55:48 -03:00
parent ba1e521f89
commit afe6d2a86a

View File

@ -99,8 +99,6 @@ cvar_t game_version = { "game_version", APP_VERSION_STRD, FCVAR_SERVER, 0.0f, NU
cvar_t maxmoney = { "mp_maxmoney", "16000", FCVAR_SERVER, 0.0f, NULL }; cvar_t maxmoney = { "mp_maxmoney", "16000", FCVAR_SERVER, 0.0f, NULL };
cvar_t round_infinite = { "mp_round_infinite", "0", FCVAR_SERVER, 0.0f, NULL }; cvar_t round_infinite = { "mp_round_infinite", "0", FCVAR_SERVER, 0.0f, NULL };
#endif // REGAMEDLL_ADD
void GameDLL_Version_f() void GameDLL_Version_f()
{ {
if (Q_stricmp(CMD_ARGV(1), "version") != 0) if (Q_stricmp(CMD_ARGV(1), "version") != 0)
@ -111,6 +109,15 @@ void GameDLL_Version_f()
CONSOLE_ECHO("ReGameDLL API version %i.%i\n", REGAMEDLL_API_VERSION_MAJOR, REGAMEDLL_API_VERSION_MINOR); CONSOLE_ECHO("ReGameDLL API version %i.%i\n", REGAMEDLL_API_VERSION_MAJOR, REGAMEDLL_API_VERSION_MINOR);
} }
void GameDLL_EndRound_f()
{
EndRoundMessage("#Round_Draw", ROUND_END_DRAW);
Broadcast("rounddraw");
CSGameRules()->TerminateRound(5, WINSTATUS_DRAW);
}
#endif // REGAMEDLL_ADD
void EXT_FUNC GameDLLInit() void EXT_FUNC GameDLLInit()
{ {
g_psv_gravity = CVAR_GET_POINTER("sv_gravity"); g_psv_gravity = CVAR_GET_POINTER("sv_gravity");
@ -209,6 +216,7 @@ void EXT_FUNC GameDLLInit()
#ifdef REGAMEDLL_ADD #ifdef REGAMEDLL_ADD
ADD_SERVER_COMMAND("game", GameDLL_Version_f); ADD_SERVER_COMMAND("game", GameDLL_Version_f);
ADD_SERVER_COMMAND("endround", GameDLL_EndRound_f);
CVAR_REGISTER(&game_version); CVAR_REGISTER(&game_version);
CVAR_REGISTER(&maxmoney); CVAR_REGISTER(&maxmoney);