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,8 +80,11 @@ void Weapons_Draw(void);
void CSEv_PlayerSwitchWeapon_i(int w)
{
player pl = (player)self;
pl.activeweapon = w;
Weapons_Draw();
if (pl.activeweapon != w) {
pl.activeweapon = w;
Weapons_Draw();
}
}
void