Make parse data respect the newely implemented scimax cvar

This commit is contained in:
Xylemon 2023-04-24 22:10:09 -07:00
parent a070a00df0
commit 0b1ca19ef7
2 changed files with 3 additions and 5 deletions

View file

@ -74,6 +74,7 @@ shdata_parse.qc
gamerules.qc gamerules.qc
gamerules_fear.qc gamerules_fear.qc
gamerules_hunt.qc gamerules_hunt.qc
gamerules_invasion.qc
gamerules_madness.qc gamerules_madness.qc
gamerules_slaughter.qc gamerules_slaughter.qc
gamerules_stealth.qc gamerules_stealth.qc

View file

@ -17,15 +17,12 @@
/* If only origin parameters are applied, make something up */ /* If only origin parameters are applied, make something up */
var int autocvar_sh_sciyaw = TRUE; var int autocvar_sh_sciyaw = TRUE;
/* Limit the amount of scientists spawned */
var int autocvar_sh_scimax = 30;
void void
SHData_SpawnScientist(void) SHData_SpawnScientist(void)
{ {
static int slimit = 0; static int slimit = 0;
if (autocvar_sh_scimax) { if (cvar("sh_scimax")) {
if (slimit >= autocvar_sh_scimax) { if (slimit >= cvar("sh_scimax")) {
dprint("shdata: scientist limit hit. ignored\n"); dprint("shdata: scientist limit hit. ignored\n");
remove(self); remove(self);
return; return;