LocalPlayer actorNr is -1 after the disconnect

Options
Hello!
I've got an issue here
One of the players got disconnected and their actorNr is set to -1 on disconnect wich is fine probably.
But that player still has actorNr == -1 after he/she has rejoined the game.
So when that player tries to get back ownership of his/her view he/she tries to call TransferOwnership(PhotonNetwork.LocalPlayer); and it does nothing.
Well, maybe local player understands what had happened, but other clients - don't, and both clients are sure they own that view.

Are there any ideas?

Comments

  • Djebedia
    Options
    pun2
    v2.16
  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @Djebedia,

    Local player's actor number is -1 outside for rooms.
    But that player still has actorNr == -1 after he/she has rejoined the game.
    When do you check ActorNr?
    Inside or after OnJoinedRoom callback?
    After PhotonNetwork.NetworkingClient.State == ClientState.Joined?
  • Djebedia
    Options
    Hi @JohnTube

    Yes, I check ActorNr after client has succesfully reconnected the master and rejoined the room.
    But after you've asked me that question I checked everything again and noticed that there took place the second disconnect right after the first one. So after I checked client state my reconnect logic got executed (and it took some time), and during that time the second disconnect occured. And that's the cause of my problems.
    Seems like I have to recheck if the client is InRoom multiple times during the execution of my reconnect logic.
    But anyways ty and sorry for my English! )