In seamless travel, why are player controllers switched to spectator state?

Hi everybody,

I’m working on a multiplayer game and I wanted to keep all controlled pawns when seamless traveling to new levels.

So I have added these pawns to the list of actors to be kept during seamless travel by overriding AGameModeBase::GetSeamlessTravelActorList

The actors were kept, but during the travel I was losing the connection between the player controller and their controlled pawns

Looking at the engine code, I saw this was coming from the AGameModeBase handling of the player controllers :

AGameModeBase::HandleSeamlessTravelPlayer will copy the old controller into a new one, and then will call AGameModeBase::InitSeamlessTravelPlayer

at the end of AGameModeBase::InitSeamlessTravelPlayer, we have this piece of code :

if (NewPC != nullptr)

	if (MustSpectate(NewPC))
		NewPC->bPlayerIsWaiting = true;

The new PC is switched to Spectating state, but I don’t really get why

I could fix my problem by saving my controlled pawn in the PostSeamlessTravel method called right before, and setting it back after the travel by having the controller possess the pawn again.

I wonder if this is the intended mechanism, but I miss the point of this switch to spectating state and I’m looking for some insight