Jump to content

Befriended Spiders will sometimes return to dens when player switches shards/server is reset/rolledback


Hornete
  • Pending

I experienced a issue recently where some of my spiders mysteriously disappeared upon rollback, or when I was going to the underground where I left 10+ or so befriended spiders, only one remained.

 

local function DoReturn(inst)
    local home = inst.components.homeseeker ~= nil and inst.components.homeseeker.home or nil
    if home ~= nil and
        home.components.childspawner ~= nil and
        not (inst.components.follower ~= nil and
            inst.components.follower.leader ~= nil) then
        home.components.childspawner:GoHome(inst)
    end
end

local function OnEntitySleep(inst)
    if TheWorld.state.iscaveday then
        DoReturn(inst)
    end
end

It looks like spiders go back to their homes when their entity sleeps, there is a leader check, Maybe the leader isn't set in time when the server is reset/player joins in fast enough before this function runs?


Steps to Reproduce

1. Tame spiders
2. Reset/rollback server, or switch shards back and forth
3. Some spiders should "mysteriously" disappear(they go back to their dens)

  • Like 1
  • Thanks 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...