Jump to content

Crash when swimming around with floater


hoxi
  • Fixed

Seems to happen when rapidly sending movement inputs.

The crash points to this bit here:

if inst.sg.statemem.swim_t == nil and not data.remoteoverridelocomote then
	inst.sg.statemem.swimming = true
	inst.sg.statemem.announced_tired = false
	inst.components.hunger:SetRate(TUNING.WILSON_HUNGER_RATE * TUNING.FLOATING_SWIM_HUNGER_RATE_MULT)
	inst.sg.statemem.swim_t = GetTime()
	inst.AnimState:PlayAnimation("swim_pre")
elseif not inst.sg.statemem.announced_tired and
	not inst.AnimState:IsCurrentAnimation("swim_pst") and
	inst.sg.statemem.swim_t > GetTime() + 0.6 -- HERE
then
	inst.sg.statemem.announced_tired = true
	inst.components.talker:Say(GetString(inst, "ANNOUNCE_FLOAT_SWIM_TIRED"))
end

This bit of code isn't isn't fully sanitized for swim_t being nil.


Steps to Reproduce
  • Be on a floater on the ocean.
  • Rapidly click or press movement keys.



User Feedback


A developer has marked this issue as fixed. This means that the issue has been addressed in the current development build and will likely be in the next update.


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