Close the room from plugin
Djebedia
✭
Is there any way to do it?
The problem is that I have a room with PlayerTTL > 0 and EmptyRoomTTL> 0 in order to make possible the disconnected players to reconnect the room. Everything works fine. But after the game is over and all players have left the room the room is still alive until EmptyRoomTTL expires. And nevertheless IsOpen and IsVisible properties of the room are both equal to false, inactive players are still able to rejoin this room. So, if one of those players initializes random matchmaking it is possible that he will join that room. And I'd like to prevent this possibility and close this room or make it inaccessible to random matchmaking.
P.S. I'm sorry for my English! )
The problem is that I have a room with PlayerTTL > 0 and EmptyRoomTTL> 0 in order to make possible the disconnected players to reconnect the room. Everything works fine. But after the game is over and all players have left the room the room is still alive until EmptyRoomTTL expires. And nevertheless IsOpen and IsVisible properties of the room are both equal to false, inactive players are still able to rejoin this room. So, if one of those players initializes random matchmaking it is possible that he will join that room. And I'd like to prevent this possibility and close this room or make it inaccessible to random matchmaking.
P.S. I'm sorry for my English! )
0
Comments
-
Hi @Djebedia,
I moved this discussion to Photon Server category.
Clients should not be "matchmaked" into rooms where they are inactive actors.
This looks like a bug to me if we manage to reproduce or maybe it's already fixed on Photon Cloud.
Also, there is no way in current public plugins SDK to remove inactive actors from plugins. I don't know if we have added that or not.
@chvetsov, your thoughts?0 -
HI, @Djebedia
Yes, JohnTube is right, that inactive players should not be matched to the game where they are inactive. that probably says that you are using either self-hosted solution or we have a bug. In the last case, we would ask you for repro case
It is possible to remove inactive players from the game. You should call RemoveActor method for them. That is basically it
best,
ilya0 -
And how does Photon determine if current client is an inactive actor of the room?JohnTube said:Clients should not be "matchmaked" into rooms where they are inactive actors.
I've figured out that those two players of the room have different userID's - mb that's the problem? But in that case can you explain me please, how should I set the userID for a client? I've tried to do it on the client side before connecting to Master and before joining the room, but it seems like Photon itself generates those ID's no matter what I do.0 -
PhotonNetwork.AuthValues = new AuthenticationValues(userId);
That helped )
So there's no bug and I have no more questions for now )
Thank you fow your answers!0