Jump to content

plz fix the bug in Celestial Scion


Wwwwuuuu
  • Pending

In SGalterguardian_phase4.lua

local function SetPreventDeath(inst, prevent)
	inst.components.health:SetMinHealth(
		prevent and
		not inst.components.health:IsDead() and
		math.min(1, inst.components.health.currenthealth) or
		nil
	)
end

This function sets minhealth to nil instead of 0.

I'm aware there are nil checks in the official code,

but many mods don't include them since the value has consistently been a numeric type for years.

This has already caused multiple mods to crash, such as ShowMe.

A simple change (replacing nil with 0) would resolve this — please consider it, Klei!


Steps to Reproduce

During the battle with the Celestial Scion, crashes consistently occur in the intervals when it releases skills — precisely when minhealth is nil.

  • Like 1



User Feedback


There are no comments to display.



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...