Jump to content

Moleworm lacks nil check for making new home


_zwb
  • DLC VERSION - IMPORTANT!: Reign of Giants, Shipwrecked, Hamlet Pending

In brains/molebrain.lua:

local function MakeNewHomeAction(inst)
    local angle = math.random(0,360)
    local offset = FindGroundOffset(inst:GetPosition(), angle*DEGREES, math.random(5,15), 120, false, false)
    return BufferedAction(inst, nil, ACTIONS.MAKEMOLEHILL, nil, inst:GetPosition() + offset)
end

Despite looking for an offset 120 times(why 120?), it still might not find one, and the game would crash when trying to add nil and Vector3 together.


Steps to Reproduce

Drop a moleworm on a small island like teleportato island in Shipwrecked.




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