In multiplayer game how can I know, when some player has disconnected the game (because of broken internet connection, for example)?
I want to know it in point, when I still able to save his PlayerState & avoid his pawn to be destroyed (I want pawn to live some seconds after player has disconnected).
What method of UE should I look to catch this event?
I’ve tried also: AGameMode::RestartPlayer() mehtod & binding to GEngine->OnNetworkFailure(), but both of thed don’t fires on player disconnection =(
It’s only APlayerController::Destroyed() left, but it looks for me like not a pretty solution. I feel there must be another place - more appropriate for my need (where I can prevent PlayerState & Pawn destruction & save them until timeout of waiting for player reconnection expired).
Any ideas?
I’ve chosen APlayerController::Destroyed() after all. Here both are still alive & this is last moment of their lifes. But thank you, nonetheless. Your info have made the picture little more clear for me & established me in my assumptions.
I’m still not completely sure PC::Destroyed() is the best place for my purposes, but it looks like it is.