Im using Windows 10 and Unity as Client.
And Windows 8 as Server with Smartfox (2.11.1) and an Physics-Client made with Unity connected to it as normal User over 127.0.0.1.
My normal game-client sends an extensionRequest to the server, when-ever the player moves to update the position. This code can only run after OnRoomJoin(BaseEvent evt) has been called. like:
Code: Select all
SFSObject test = new SFSObject();
test.PutFloat("x", coords.x);
test.PutFloat("y", coords.y);
test.PutFloat("z", coords.z);
ExtensionRequest request = new ExtensionRequest("sendTransform", test, sfs.LastJoinedRoom, true);
sfs.Send(request);
Server handles this and sends the position to the "physics-client". like:
Code: Select all
public void handleClientRequest(User user, ISFSObject data) {
User gamemaster = getApi().getUserByName("PhysicsClient");
if (gamemaster != null) {
trace("---------- MovePlayerRequest ----------");
trace("---------- Sendername: " + user.getName() + "----------");
trace("---------- Gamemaster: " + gamemaster.getName() + "----------");
data.putUtfString("id", user.getName());
this.send("MoveRemotePlayer", data, gamemaster, true);
} else {
trace("Physics-Client not connected!");
}
And this works fine! But just for a while....
After this while the following error occurs(sry for image, i cant copy it):
I know what this means! But i invested hours and i can say, the player "Dex" is 100% joined to that room. There is no code for leaving that room and at the beginning it works?
Pleas tell me why i can do this a while and after that it shows my player isnt joined that room but he is!
Any idea? Something with MMORooms i dont know? Im desperately.
If needed, pleas ask for more information.
So many thanks for helping and sorry for bad english.
regards