Jump to content

Multiple Great Depths Worm (worm_boss) can spawn in a wave


Aztronat
  • Pending

From my understanding, it is intended that only 1 worm_boss would spawn in an upgraded wave.

-- scripts/prefabs/cave.lua - line 303
wave_pre_upgraded = "used"   -- We've got one for the wave now, clear this so there aren't more.


However, in hounded.lua , the HandleSpawnInfoRec function does not update the component's _wave_pre_upgraded variable after a successful spawn.

-- scripts/components/hounded.lua - lines 917-924
if local_wave_pre_upgraded == "used" then
	for key, data in pairs(_delayedplayerspawninfo) do
		data._wave_pre_upgraded = nil
	end
		or key, data in pairs(_missingplayerspawninfo) do
		data._wave_pre_upgraded = nil
	end					
end

-- scripts/components/hounded.lua - lines 1037-1039
for i, spawninforec in ipairs(_spawninfo) do
	HandleSpawnInfoRec(dt, i, spawninforec, groupsdone)
end

If players are scattered into multiple spawn groups, the OnUpdate loop calls HandleSpawnInfoRec for each group. Since the flag doesn't get cleared and it remains "available" for subsequent groups, every group triggers ShouldUpgrade, resulting in multiple worm bosses spawning (have seen 3 and even 4).


Steps to Reproduce

Have multiple players scattered around the caves when an upgraded worm wave is about to happen (worm boss).

  • Big Ups 1



User Feedback


is this really a bug though? The "boss" is quite easy and is nearly spider queen / treeguard tier

Share this comment


Link to comment
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
  • Create New...