Jump to content

Shard_UpdateWorldState crash due to typo


asgerrr
  • Fixed

In the file scripts/shardnetworking.lua, there's this code starting at line 101:

    for k, v in pairs(ShardPortals) do
        if ready and (v.components.worldmigrator.linkedWorld == nil
                    or v.components.worldmigrator.auto == true) then
            if v.components.worldmigrator.shard_name == nil or v.components.worldmigrator.shard_name == shard_name then
                -- Bind unused portals to this new server, mm-mm!
                v.components.worldmigrator:ClearDisabledWithReason("MISSINGSHARD")
                v.components.worldmigrator:SetDestinationWorld(world_id)
            end
        elseif v.components.worldmigrator.linkedWorld == world_id then
            v.components.worldmigrator:ClearDisabledWithReason("MISSINGSHARD")
            v.components.worldmigrator:ValidateAndPushEvents()
        else
            print(string.format("Skipping portal[%s] (different permanent world)", tostring(v.components.worldmigrator.id)))
            inst.components.worldmigrator:SetDisabledWithReason("MISSINGSHARD") --BAD, should say "v" instead of "inst"
            inst.components.worldmigrator:ValidateAndPushEvents()
        end
    end

Lines 114 and 115 use "inst" when they should use "v". Another developer on the mod I work on had the game crash while changing shards because of this.


Steps to Reproduce

I don't really know how to reproduce this but the issue should be quite apparent regardless.

  • Like 2
  • Thanks 1



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