Simple enough to reproduce:
1. Download and open the SmartFox MMORoomDemo (I'm using Unity 2021.2.10)
2. Add this line of code to FixedUpdate of GameManager.cs:
Debug.Log(sfs.LastJoinedRoom.ContainsUser(sfs.MySelf));
3. Run the demo, login, and observe that it always returns false.
Is this intended behavior? I noticed it while trying to send a SetRoomVariablesRequest with the additional Room parameter. This appears to rely on the aforementioned ContainsUser method which kept giving me the "You are not joined in the target room" warning.
ContainsUser always returns false for MMO rooms
-
- Posts: 7
- Joined: 03 Dec 2021, 16:53
Re: ContainsUser always returns false for MMO rooms
Hi,
yes it is the intended behavior, the MMORoom uses a "proximity list" which replaces the standard User list, as per the MMO documentation overview:
"In other words the proximity list substitutes the regular user list on the client side, optimizing the number of updates that the user receives. On the server side the full user list of the Room is still accessible in its entirety."
http://docs2x.smartfoxserver.com/Advanc ... /mmo-rooms
Yes that seems incorrect as the check would only work for regular Rooms.
I have added an entry in our bug tracker so that it will be fixed in the next API release.
Thanks
yes it is the intended behavior, the MMORoom uses a "proximity list" which replaces the standard User list, as per the MMO documentation overview:
"In other words the proximity list substitutes the regular user list on the client side, optimizing the number of updates that the user receives. On the server side the full user list of the Room is still accessible in its entirety."
http://docs2x.smartfoxserver.com/Advanc ... /mmo-rooms
I noticed it while trying to send a SetRoomVariablesRequest with the additional Room parameter. This appears to rely on the aforementioned ContainsUser method which kept giving me the "You are not joined in the target room" warning.
Yes that seems incorrect as the check would only work for regular Rooms.
I have added an entry in our bug tracker so that it will be fixed in the next API release.
Thanks
-
- Posts: 7
- Joined: 03 Dec 2021, 16:53
Re: ContainsUser always returns false for MMO rooms
Unfortunately after downloading the latest C# API (1.7.18) the problem still exists for MMO rooms.
Re: ContainsUser always returns false for MMO rooms
Hi,
we have released a new update with the fix to the problem you have posted here.
https://www.smartfoxserver.com/download/#p=client
Let us know if it helps.
Cheers
we have released a new update with the fix to the problem you have posted here.
https://www.smartfoxserver.com/download/#p=client
Let us know if it helps.
Cheers
Who is online
Users browsing this forum: Stevenor and 117 guests