Download

How to detach from current server and continue playing offline

Hi guys,

I’m working on travelling from planet to planet, and I need ability to detach from current server (that is serving current planet) as the rocket takes off.

Space travel will be handled offline.

Currently I can stream in the ‘space’ level as we’re taking off, and this works well in editor. However, in cooked build, when i disconnect from the server, I lose player controller, and everything halts.

Is it possible to re-declare authority of Player Controller to become ROLE_Authority, without having to do full reload?

Hmm this appears easier than I expected, in PlayerController, this appears to do the trick:



	if (IsLocalPlayerController() && Role < ROLE_Authority)
	{
		GEngine->ShutdownWorldNetDriver(GetWorld());

		Role = ROLE_Authority;
	}