Why is EmptyRoomTtl commented? I Need it!
Options
ahoogol
✭
I want to set EmptyRoomTtl to 0 when PlayerTtl is not 0 in creating game. but RoomOptions.EmptyRoomTtl is commented in LoadbalancingPeer.cs line ~1341.
In other place, i saw this:
In other place, i saw this:
if (roomOptions.PlayerTtl > 0 || roomOptions.PlayerTtl == -1) { op[ParameterCode.CheckUserOnJoin] = true; op[ParameterCode.PlayerTTL] = roomOptions.PlayerTtl; op[ParameterCode.EmptyRoomTTL] = roomOptions.PlayerTtl; //Oops, this line is all my problem!!!!! }
0
Comments
-
Hi,
Yes, it's been decided to remove this because PlayerTtl seems enough to define a posible lenght for a game.
Maybe you have a good case for why a PlayerTtl should less than the RoomTtl, we are ready to consider this, but did not find a good case to justify the added complexity.
Bye,
Jean0 -
Hi @jeanfabre,
In my case i want to disableEmptyRoomTTL
whilePlaterTTL
is enabled. because i usePhotonNetwork.JoinRandomRoom
to join random room but i dont want to join the room that is empty and not clean (has scene instantiated objects), and instead i want to create new clean room.
so commenting below line will solve my problem:if (roomOptions.PlayerTtl > 0 || roomOptions.PlayerTtl == -1) { op[ParameterCode.CheckUserOnJoin] = true; op[ParameterCode.PlayerTTL] = roomOptions.PlayerTtl; //op[ParameterCode.EmptyRoomTTL] = roomOptions.PlayerTtl; //Oops, this line is all my problem!!!!! }
I dont like to change PUN code manually. So can you add an option for it in future version?
thanks0 -
Hi,
yeah, I think your use case makes sense. I have raised the question internally, we'll see.
Bye,
Jean0 -
Hi,
RoomTtl will be enabled back in the next Update on the Asset store.
Bye,
Jean0 -
hi @jeanfabre ,
Thanks, in the version 1.76, it is fixed.
But that line is not commented yet, so setting EmptyRoomTtl to zero while PlayerTtl is greater than zero, will not disable it.
A trick for this issue is setting to 1 that is very little for activating condition: EmptyRoomTtl>00 -
Hi,
can you rephrase, I am missing the point here. What line is not commented?
Bye,
Jean
0 -
@ahoogol: You mean that the EmptyRoomTTL is still set with the PlayerTTL. So you can't have PlayerTTL > 0 and EmtpyRoomTTL == 0.
Find this op[ParameterCode.EmptyRoomTTL] = roomOptions.PlayerTtl; in the LoadBalancingPeer and remove that line.
We will remove that in the next update, too. Then both values are fully independent.0 -
Ahhh, I see
0 -
@Tobias , @jeanfabre : Thanks. it is fixed now in v1.770