Client side issues after first seamless travel
My starting point is, LAN on the same physical machine. Two packaged instances running development builds. Created a session which has been successfully joined by a client. Evidence of that is both characters can walk around in the lobby level and replicate fine. The problem comes when we move from lobby to the next map.
The way I think I do should do this is with this code "GetWorld()->ServerTravel("/Game/Maps/Arena1", true);" which is run from the server GameInstance. This then calls PreClientTravel on both Server and Client: I have logs that state this. The name of the playercontrollers during the PreClientTravel is PlayerController_0. I am expecting HandleSeamlessTravelPlayer and InitSeamlessTravelPlayer to be called on the server with both server and client playercontrollers, but this only happens with the servers local player. Strange also is that during this process on the client another player controller gets created from a network request, so now the client has got two playercontrollers updating. I guess swap player controller should be called somewhere. A little later on PlayerCanRestart_Implementation does get called for both player controllers and they are called different things now, one is PlayerController_0 and the other is PlayerController_1
I am guessing I have not switched playercontrollers on the client correctly at some point. I have overriden SwapPlayerControllers on GameMode but this never gets called.
Does anyone know what could be the issue?
asked May 26 '18 at 09:36 PM in C++ Programming
In the child class' overridden functions do you call the parent class' version of the same function?
answered May 27 '18 at 09:30 PM
Well, It looks like you know more about network code than me, and I actually have done no coding except in Blueprint with Unreal. However, I can share a few observations that might help in your search for the problem:
Hope those help.
answered May 29 '18 at 09:22 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here