From a22727342e0728f4cf64ba96dd643e7ecf807898 Mon Sep 17 00:00:00 2001 From: Damgam Date: Mon, 8 Jul 2024 18:11:57 +0200 Subject: [PATCH] Scav frontbusters surfaces fix (#3350) * hotfix --- luarules/gadgets/scav_spawner_defense.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/luarules/gadgets/scav_spawner_defense.lua b/luarules/gadgets/scav_spawner_defense.lua index 11eec919d35..1935b9f4576 100644 --- a/luarules/gadgets/scav_spawner_defense.lua +++ b/luarules/gadgets/scav_spawner_defense.lua @@ -1199,7 +1199,7 @@ if gadgetHandler:IsSyncedCode() then end if mRandom() <= config.spawnChance and waveParameters.frontbusters.cooldown <= 0 then local squad = squadSpawnOptions.frontbusters[math.random(1, #squadSpawnOptions.frontbusters)] - if squad and ((surface == "land" and squad.surface ~= "sea") or (surface == "sea" and squad.surface ~= "land")) then + if squad and squad.surface and ((surface == "land" and squad.surface ~= "sea") or (surface == "sea" and squad.surface ~= "land")) then if mRandom() <= config.spawnChance and (not waveParameters.frontbusters.units[squad.name]) and squad.minAnger <= techAnger and squad.maxAnger >= techAnger and Spring.GetTeamUnitDefCount(scavTeamID, UnitDefNames[squad.name].id) < squad.maxAlive and waveParameters.frontbusters.unitCount == 0 then for i = 1, math.ceil(squad.squadSize*config.spawnChance*((SetCount(humanTeams)*config.scavPerPlayerMultiplier)+(1-config.scavPerPlayerMultiplier))) do waveParameters.frontbusters.units[squad.name] = true