Prevent monster entities from spawning outside coop 1 or maxplayers 1.

This commit is contained in:
Marco Cawthorne 2020-06-12 10:03:07 +02:00
parent bdfb040bc2
commit bbad094cae
1 changed files with 6 additions and 0 deletions

View File

@ -418,5 +418,11 @@ CBaseMonster::Respawn(void)
void
CBaseMonster::CBaseMonster(void)
{
/* FIXME: Put this somewhere else? */
if (!(cvar("coop") == 1 || cvar("sv_playerslots") == 1)) {
remove(this);
return;
}
CBaseEntity::CBaseEntity();
}