Jump to content
madrussian

clientOwner going haywire

Recommended Posts

For me in MP, clientOwner called on server always returns 2.  On both Hosted Server and Dedicated Server.  As in, “you can take it to the bank” always.

 

But one time in approx ten-thousand runs, clientOwner called on server returned something like 12 or 13, and totally borked my dynamic mission!  I have no idea how or why this happened but now I know it indeed does happen (did detailed analysis during that single run).  Need to reproduce this phenomenon, in order to handle this possibility properly via a fix.

 

Has anyone else seen this?  [In MP, clientOwner called on server returning value other than 2]  Anyone know under what conditions this occurs?

Share this post


Link to post
Share on other sites

Strange. How and with what are you using clientOwener, I know it is called on server. Can you share some code snippet/portion?

Share this post


Link to post
Share on other sites

@HazJ

Let's see, seems you are possibly thinking of the owner command?  (Indeed owner must be called on the server.)

 

In contrast, clientOwner is intended to be called on any machine (including all clients).  Can be used to track the various machines in MP game.

 

Here's one example of how I use clientOwner.  Upon mission startup, my group-based respawn system (GLR, short for Group Linked Respawn) runs on all machines and all initial player units store their clientOwner in a temporary "MRU_GLR_ClientOwner" variable on the units.  When this part gets done Server then does a pass, storing these clientOwners in an ordered array (MRU_GLR_OrderedClientOwners) to keep track of the original player hierarchy.  So when players die and take over as an AI, the player with highest priority (earliest clientOwner in MRU_GLR_OrderedClientOwners) becomes group leader.  The thinking is player who took the top spot in the MP lobby wants to be group leader, so keep that player as group leader.  Also, my group linked respawn system allows players to degroup into smaller groups, and so this hierarchy is important when players die in one group and end up in another group (that may or may not already have players, etc).

 

Anyhow regarding this thread, here's what I'm really after:

 

On the clientOwner reference, in the comments section Killzone Kid's mentions the following:

 

Quote

On hosted server there could be some inconsistency between clientOwner, owner and object creator id, especially in missions started from save. On the dedicated server this command however works reliably.

 

Considering this inconsistency exists, and that I may have accidentally stumbled upon this by witnessing the aforementioned clientOwner inconsistency, curious about following.  When "in MP, clientOwner called on server returning value other than 2" is happening:

 

In this case how does remoteExec handle it's targets parameter?  If you use 2 for target, will the server get the message, or must you now use the server's bizzaro clientOwner value to send server messages via remoteExec?

 

The only way to answer this question is to figure out how to reliably reproduce the "in MP, clientOwner called on server returning value other than 2" setting.  At present, I have no clue how to accomplish this!

 

Any ideas?

 

Share this post


Link to post
Share on other sites

for server always use 2

its only clientOwner command that return wrong data when called on server.

Maybe because server is not an client indead.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×