Gamerules: Disable monster spawning in multiplayer, also fix draw being

called when the weapon is already selected.
This commit is contained in:
Marco Cawthorne 2021-09-18 01:33:26 +02:00
parent e3dae1cc73
commit 0c9811d3e3
Signed by: eukara
GPG key ID: C196CD8BA993248A
3 changed files with 12 additions and 2 deletions

View file

@ -42,6 +42,7 @@ class HLMultiplayerRules:HLGameRules
virtual void(void) FrameStart;
virtual void(void) CheckRules;
virtual int(void) MonstersSpawn;
/* client */
virtual void(base_player) PlayerSpawn;

View file

@ -176,6 +176,12 @@ HLMultiplayerRules::ConsoleCommand(base_player pp, string cmd)
return (1);
}
int
HLMultiplayerRules::MonstersSpawn(void)
{
return (FALSE);
}
void
HLMultiplayerRules::HLMultiplayerRules(void)
{

View file

@ -80,9 +80,12 @@ void Weapons_Draw(void);
void CSEv_PlayerSwitchWeapon_i(int w)
{
player pl = (player)self;
if (pl.activeweapon != w) {
pl.activeweapon = w;
Weapons_Draw();
}
}
void
Player_Precache(void)