1) Player A and B are in the same room X.
2) Player B moves to room Y.
3) Player A has his User Variables updated by the server.
4) Player B returns to room X, but has the old values of A's User Variables.
Since User Variables changes are only broadcast to people in the same room, is this intended? If a player is rejoining a previous room, how should I ensure that all User Variables are up-to-date after rejoining?
I am using Unity, this is what's going on in my client code:
Code: Select all
smartFox.AddEventListener(SFSEvent.ROOM_JOIN, OnJoinRoom);
...
private static void OnJoinRoom (BaseEvent evt) {
Room room = (Room)evt.Params["room"];
// Find out which users are in the room we just joined
foreach (User user in room.UserList) {
// The UVs for these user objects didn't get updated while we
// were in a different room! Ack!
App.drawUserOnScreen(user);
}
}