found that “OnEndViewTarget” in the Player Character its called before destroy.
For check i made a function (served side) for un-possess the pawn, called with a key, that work, press the key and then quit or alt+f4 and character not get destroyer
The problem its i call the same function from “OnEndViewTarget” for un posses and if “Quit Game” or Alt+F4, OnEndViewTarget its called but the pawn still got destroyed.
grrr the engine must have something easy for keep the character without destroy on the map if some problem occurs, nobody known?
i consider that option and if the player reconnect just “give” that copy for posses but seems a “dirty” trick. hehe.
And in MP i think if after destroy->spawn others will notice.
I think the engine must have any mechanism for avoid that. Greatest part of MP games like DOTA, CS the player character isn’t destroyed on network error/disconnect and/or leave. Seems basic feature.
I you set game mode’s default pawn to none and spawn characters at start, then later possess maybe the character won’t be destroyed
If character is still destroyed under those circunstances that should be reported as a bad engine design and ask Epic to change that.
Clients already join my server as spectator, and then when all its ready i spawn the characters and then assign/possess characters->player controllers, all in the gamemode class.
i doubt its bad design, i think its only i not known how do it. if was a bug or bad design someone before must have this problem. I suppose someone create already a MP game that the player possess a car, a character shareable or persistent or other thing and want that thing not get destroyed if a remote client got disconnect/network error or user quit, that can break a MP game if that thing its supposed need be in game/round .
I search forums and AH and nobody have that problem.
This is interesting; then I don’t know how to solve it as well, hope someone come in and explain to us if there’s a solution for this. From my point of view controller shouldn’t auto destroy the pawn if it wasn’t spawned with controller already attached to it.