henpemaz/Rain-Meadow

Arena: NextLevel is not stable for all clients

Closed this issue · 2 comments

Once again in painful territority.

  • Test severing connection from host / clients completely in new world vs old world. No errors for missing entities should throw.
  • Revisit the changes made to the Request/Release paradigm for Arena and see if we can backtrack
  • I need to make a solution that also accommodates playing the same level back to back (may need to follow similar logic to re-using gates by copying the world session?)

Perhaps the flow should be:

  1. Host exits current resource
  2. Host requests next resource
  3. Wait for host to establish session
  4. Notify clients to leave (RPC or other)
  5. Client request to join resource

Was initially concerned about clients having ownership of previous world, but maybe we need to play hot potato for the release to work properly. Having to enable re-usable worlds is going to force a change to occur in the current logic.

// if there is a gate, the gate's room will be reused, it needs to be made available

Might be able to leverage this _Update to determine if the upcoming room is the same as the current room and re-use it.

Did some work with NextLevel where if the worldsession is available and active we deactivate it, otherwise we release it asap.

Currently trying to figure out the next step. I can make a request at the end of NextLevel to a new arena world session but I get "world is not set" thrown because we aren't at the world loader step yet.

But if I release the world session in NextLevel I must request it then too.

So thinking out loud: What instead I should do is perform the release / deactivate logic in the WorldLoader step so that if we have a worldsession that is available / active we turn it off then clear the way for the new world.

Will test and report results.

EDIT: Worked. Just need to test with real players.