Add CheckRules() and the HLMultiplayerRules constructor. Maybe we should

just inherit the whole file and #ifdef REWOLF out.
This commit is contained in:
Marco Cawthorne 2021-08-01 11:10:03 +02:00
parent d44143083c
commit 9931dac7c6

View file

@ -23,6 +23,14 @@ HLMultiplayerRules::FrameStart(void)
}
}
void
HLMultiplayerRules::CheckRules(void)
{
/* last person who killed somebody has hit the limit */
if (g_dmg_eAttacker.frags >= cvar("mp_fraglimit"))
IntermissionStart();
}
void
HLMultiplayerRules::PlayerDeath(base_player pp)
{
@ -124,3 +132,11 @@ HLMultiplayerRules::ConsoleCommand(base_player pp, string cmd)
return (1);
}
void
HLMultiplayerRules::HLMultiplayerRules(void)
{
/* these lines do nothing but tell the server to register those cvars */
autocvar(mp_timelimit, 15, "Timelimit for multiplayer rounds");
autocvar(mp_fraglimit, 15, "Points limit for multiplayer rounds");
}