Jump to content

Recommended Posts

Hello guys,

 

in arma 3 there is an already opened issue.

The issue is that a linux headless client (HC) which is connected to a linux game server gets kicked for signature timeout after some time.

The command line parameter -cpucount=1 passed at HC start can extend the time until it gets kicked from some minutes (without cpucount=1) to some hours. In my case the HC gets kicked after nearly exact 3 1/2 hours.

 

I wrote a script at my linux machine which reconnects the HC after it was kicked within a minute.

 

Now the problem.

I m editing a domination map created by Xeno to implement some minor features.

I want that features executed at HC if it is connected.

 

I know that I can detect HC with

if (!isNil "HC_D_UNIT") then
{
 _hc_present = true;
};

Where HC_D_UNIT is the name of the HCs game logic.

 

What Xeno did in his d_init.sqf is something like that:

if (isNil "HC_D_UNIT") then
{
 HC_D_UNIT = _this;
};

_this represents the server which means if I try to detect the HC as mentioned above then _hc_present is always true because it points to the server now.

 

I think Xeno did that to ensure that all work which is thought to be done by HC should be done by server if HC is not connected until a timout.

 

I wont change Xenos code cause i dont know what depends on it.

What I need now is another method to detect if the HC is present or not.

 

Thank you for any advise.

Share this post


Link to post
Share on other sites

I thought about it again and i think i ve a workaround but one question remains.

 

My solution would be to rename the game logic to HC_D_UNIT2

 

then I could check the HC_D_UNIT2 for a present HC and link it to Xenos HC_D_UNIT:

 

if (!(isNil "HC_D_UNIT2") and !(isNull HC_D_UNIT2)) then 
{  
 HC_D_UNIT = HC_D_UNIT2;
 _hc_present = true;
}
else
{
 HC_D_UNIT = owner ServerObject; // any object hosted by server
 _hc_present = false;
};

With that code I can switch Xenos HC_D_UNIT between Server and my HC and I could detect if HC is present and store it in _hc_present.

 

But will that work?

Especially the if then condition.
The question is, will the game logic now named HC_D_UNIT2 change to Null if the HC gets disconnected?

 

Thank you for any help.

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

×