
So back to topic, here is my understand while I traverse c++ code in order to do a proper multiplayer respawn/reposses.
First question is simpler, controller have no ownership they are game object that possess other things(mostly pawn), so that's normal.
But Pawn should really have something to control them, it may not be actual "owner", but you can try use getcontroller to see if a pawn is currently possessed.
I think ownership is pretty vague thing to say, but for server/client, server owns pretty much everything, and client only owns the local player controller.
On server, there is always a mirrored player controller that client's player controller sents info to. Imagine that player controller is actually the "wire" from your client to server.
However, they are not the same instance and does not have same name, this is the same for all object, except some base object like GameMode or level objects which only exists on server.
(in source code, all client side level objects are wiped during loading, so everything that can move is replicated from server)
Here is my speculation(again, sorry I can't give a more solid answer due to my limited knowledge):
When a pawn is not controlled by a server side controller, and when it moved out side of relevancy, how do you check what info sent to client?
You basically see what's the mirrored controller on server and check what it is currently controlling, if it's a pawn, then send relevant info with in radius.
In our case, your mirrored controller no longer control anything, server MyAIController does, and I don't know if multiple controller possession is possible or not.
So when your controller possess nothing(like if you kill the pawn in client), they are default to possess a default pawn(basically a empty locator with default camera).
I guess that's why it always seems to disappear for the client in a weird way. (as your server player controller are left in place where your pawn first initialized. )
So my suggestion would be, you might guessed it already, to try move your server side player controller with your currently controlled pawn.(what ever the current one your MyAIController possessed)
It sounds simple with just one line, but it would require some careful thought of how you preserve reference to your currently possessed pawn, and still have server side player controller properly update it's position.
Good Luck!

And hopefully Epic guys can spot this thread and come in to offer more in depth views about this apect in framework and how can we approach this.
(Instead of waiting it to happen one day.)
Leave a comment: