Jump to content

Snowstorm Never Stops in Bonechill Quarry Once Started (After r617791)


Instant-Noodles
  • Branch: Preview Branch Version: Windows Pending

This is due to a change introduced in r617791 to sg_trap_cold.

Original Code (r617367: Lines 51 to 58)

if data and data.active_timeout_min and data.active_timeout_max then
	inst.sg:SetTimeout(math.random(data.active_timeout_min, data.active_timeout_max))
elseif (not IsBossOrMiniboss()) then
	local progress = TheWorld:GetDungeonProgress()
	local min = active_mintime[math.ceil(#active_mintime * progress)]
	local max = active_maxtime[math.ceil(#active_maxtime * progress)]
	inst.sg:SetTimeout(math.random(min, max))
end

New Code (r617791, r618064, r618235: Lines 51 to 60)

if data and not data.always_active then
	if data.active_timeout_min and data.active_timeout_max then
		inst.sg:SetTimeout(math.random(data.active_timeout_min, data.active_timeout_max))
	elseif (not IsBossOrMiniboss()) then
		local progress = TheWorld:GetDungeonProgress()
		local min = active_mintime[math.ceil(#active_mintime * progress)]
		local max = active_maxtime[math.ceil(#active_maxtime * progress)]
		inst.sg:SetTimeout(math.random(min, max))
	end
end

However, data is only defined for the Rook boss fight (in bc_sedament).  Therefore, in all rooms aside from the Rook boss fight, this entire block of code is skipped (since data is nil).  So, a timeout is never set for the snowstorm and, thereby, causes the snowstorm to never stop until the trap_cold instance is removed (on room clear).

Changing the code indent would fix the issue.  For example, to:

if data and not data.always_active and data.active_timeout_min and data.active_timeout_max then
	inst.sg:SetTimeout(math.random(data.active_timeout_min, data.active_timeout_max))
elseif (not IsBossOrMiniboss()) then
	local progress = TheWorld:GetDungeonProgress()
	local min = active_mintime[math.ceil(#active_mintime * progress)]
	local max = active_maxtime[math.ceil(#active_maxtime * progress)]
	inst.sg:SetTimeout(math.random(min, max))
end

 


Steps to Reproduce

See Issue Description

  • Like 1
  • Thanks 1



User Feedback


There are no comments to display.


×
  • Create New...