Jump to content
Sign in to follow this  
pSiKO

Strange issue with unit position when owned by a Headless client

Recommended Posts

hi, all people
I face a very strange issue when a unit is owned by an HC client, and I need you advice

if a unit is owned by the HC, the returning unit's position is different from the dedicated server or a classic client !!

let's say, you have created a unit and then transferring the ownership (setGroupOwner) to the hc and then you execute globally the code below, you don't get the same position !!
 

{ diag_log [name _x, getpos _x]; } foreach (units west)

 

I've got the following result:

 

log from dedicated server (same result on client)

13:50:01 ["Liam Anderson",[8524.19,25016,0.00141907]]
13:50:01 ["Chris Taylor",[8516.94,25031,0.00115967]]
13:50:01 ["Lucas Campbell",[8518.13,25031.9,0.00171661]]
13:50:01 ["Gillian Martinez",[8540.17,25055.6,0.00149536]]
13:50:01 ["Alexander Robertson",[8534.6,25018.1,0.00144958]]
13:50:01 ["Spencer Clark",[8447.86,25100.6,0.000762939]]
13:50:01 ["Harry Stewart",[8446.98,25099.5,0.0018692]]
13:50:01 ["pSiKO",[23585.8,18697.4,0.00143886]]
13:50:01 ["Jabr Noori",[23578.5,18628.1,0.00143886]]


log from the HC client

13:50:01 ["Anderson",[8524.19,25016,0.00117493]]
13:50:01 ["Taylor",[8517.09,25031.3,0.00102234]]
13:50:01 ["Campbell",[8518.11,25031.9,0.00175476]]
13:50:01 ["Martinez",[8540.38,25055.5,0.00156403]]
13:50:01 ["Robertson",[8534.6,25018.1,0.00143433]]
13:50:01 ["Clark",[8447.86,25100.3,0.000930786]]
13:50:01 ["Stewart",[8446.99,25099.5,0.00167084]]
13:50:01 ["pSiKO",[23585.8,18697.4,0.00143886]]
13:50:01 ["Noori",[23581.2,18668.3,0.00143886]] <--- owned by the HC

 

look at Noori unit (owned by the hc), you see a different position and even the name return is different and I don't understand why!

if someone can tell me what's wrong ?

note, the HC and the dedicated server are started with exactly same parameters

and that not the returning name that annoy me but the position,
because that lead to distance/ distance2D issue when computed on the hc,

the unit is closer/far than when it's owned by the dedicated server (or no hc is used)
 

I try different approach, getposATL/ASL, distance from object or position, and I always got the same error

the distance seem to be the half on the HC (roughly)


if it may help, the dedicated server run on linux, but the hc run on window

any help mucho mucho appreciated !

have a good day

Share this post


Link to post
Share on other sites

reproduce scenario
 

// on Altis salt lake
// execute on server only

[] spawn { 
_pos = [23581.2,18668.4,0.00143886]; 
_grp = createGroup [west, true]; 
_unit = _grp createUnit ["B_Soldier_unarmed_F", _pos, [], 0, "NONE"]; 
sleep 1; 
_grp setGroupOwner (owner HC1); 
sleep 1;
diag_log (groupowner _grp);
};

 

note: my headless name is HC1, you can change the value by the netid manually

// execute on client only
// cursor on the unit created above

[cursorobject] joinSilent (group player);


// execute globally

{ diag_log [name _x, getposatl _x]; } foreach (units west);


now check the rpt log for unit position

//dedicated
15:16:16 ["pSiKO",[23583,18672,0.00143886]]
15:16:16 ["William Turner",[23592.6,18649.1,0.00143886]]

// hc
15:16:15 ["pSiKO",[23583,18672,0.00143886]]
15:16:15 ["Turner",[23582.4,18668.9,0.00143886]]

Share this post


Link to post
Share on other sites

after some debugging,
the issue occur when I order the unit to join my group.

 

like if having a remote unit in my group mess with the object info on the network.


it only fail when remote unit belong to HC, it works fine when it's owned by the server

 

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
Sign in to follow this  

×