Add CheckRules() and the HLMultiplayerRules constructor. Maybe we should
just inherit the whole file and #ifdef REWOLF out.
This commit is contained in:
parent
d44143083c
commit
9931dac7c6
1 changed files with 16 additions and 0 deletions
|
@ -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");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue