Updated CritterSpawn Congestion Fix to 1.54

This commit is contained in:
Eddoursul 2024-03-27 19:16:13 +01:00
parent ca864f878c
commit 371d93ed9d
2 changed files with 3 additions and 3 deletions

Binary file not shown.

View File

@ -85,7 +85,7 @@ endproperty
bool Function VanillaLoopBreak() bool Function VanillaLoopBreak()
if (bLooping || iCurrentCritterCount>0) if (bLooping || iCurrentCritterCount != 0)
; breaking OnCellAttach runaway loop in baked vanilla functions ; breaking OnCellAttach runaway loop in baked vanilla functions
bLooping = false bLooping = false
; breaking SpawnInitialCritterBatch runaway loop in baked vanilla and uskp functions ; breaking SpawnInitialCritterBatch runaway loop in baked vanilla and uskp functions
@ -171,7 +171,7 @@ Function SpawnABatchOfCritters()
spawnAttempts = 1 spawnAttempts = 1
endif endif
while (spawnAttempts) while (spawnAttempts>0)
if (SpawnCritterAtRef(self)) if (SpawnCritterAtRef(self))
iSpawnedCritterCount += 1 iSpawnedCritterCount += 1
endif endif
@ -179,7 +179,7 @@ Function SpawnABatchOfCritters()
endWhile endWhile
isSpawning = false isSpawning = false
if (iMaxCritterCount - iSpawnedCritterCount + iDeadCritterCount) if (iMaxCritterCount - iSpawnedCritterCount + iDeadCritterCount>0)
;we couldn't spawn enough critters, or the player is currently killing them : try a bit later ;we couldn't spawn enough critters, or the player is currently killing them : try a bit later
QueueAdditionalSpawns() QueueAdditionalSpawns()
endIf endIf