Jump to content

Sync issue with two shard world removes King of the Merms buffs for Wurt when migrating shards


konijnenmoed
  • Pending



User Feedback


The issue seems to be on load specifically, it syncs fine otherwise.

I think the issue lies here:

function Shard_OnShardConnected(world_id, tags, world_data, shard_name)
    -- NOTES(JBK): Only should be called when the shard state is REMOTESHARDSTATE.READY.
    if Shard_IsMaster() then
        Shard_SyncWorldSettings(world_id)
    else
        SendRPCToShard(SHARD_RPC.ResyncWorldSettings, SHARDID.MASTER)
    end
    if Shard_IsMaster() then
        if TheWorld then
            local shard_mermkingwatcher = TheWorld.shard.components.shard_mermkingwatcher
            if shard_mermkingwatcher then
                shard_mermkingwatcher:ResyncNetVars()
            end
        end
    end
    local shardtransactionsteps = TheWorld and TheWorld.components.shardtransactionsteps or nil
    if shardtransactionsteps then
        shardtransactionsteps:OnShardConnected(world_id)
    end
end

This function only handles a case of resyncing the net vars from master to secondary shards when the shard is connected, but there's no handling for secondary to master.

The ResyncNetVars call needs to happen in all shards instead of just master, and the function needs to be changed to account for secondary shards so that they sync using RPCs as usual, instead of setting the net vars.

 

 

Slightly related, since I didn't think it'd be worth making a new thread for it:

    inst._wurtloadtask = inst:DoTaskInTime(0, (TheWorld.components.mermkingmanager ~= nil
            and TheWorld.components.mermkingmanager:HasKingAnywhere()
            and RoyalUpgrade)
        or RoyalDowngrade
    )

Wurt's loading task doesn't pass silent as true for neither RoyalUpgrade or RoyalDowngrade, this results in the animation and dialogue playing any time Wurt spawns and receives the "Merm King alive" upgrade, when joining a server or travelling from shard to shard.

  • Thanks 1
  • Big Ups 1

Share this comment


Link to comment
Share on other sites



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