mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
set variable public didn't work / didn't work on server and headless client
This commit is contained in:
parent
dfa6d71a64
commit
d33a98c612
@ -21,11 +21,13 @@ params ["_object", "_varName", "_value", ["_sync", 1]];
|
||||
// set value locally
|
||||
_object setVariable [_varName, _value];
|
||||
|
||||
// Exit Dedicated server and headless Clients
|
||||
if (!hasInterface) exitWith {};
|
||||
// Exit if in SP
|
||||
if (!isMultiplayer) exitWith {};
|
||||
|
||||
private ["_idName", "_syncTime"];
|
||||
|
||||
_idName = format ["ACE_setVariablePublic_%1", _varName];
|
||||
|
||||
if (_idName in GVAR(setVariableNames)) exitWith {};
|
||||
|
||||
_syncTime = ACE_diagTime + _sync;
|
||||
@ -39,6 +41,7 @@ if (isNil QGVAR(setVariablePublicPFH)) exitWith {};
|
||||
GVAR(setVariablePublicPFH) = [{
|
||||
private "_delete";
|
||||
_delete = 0;
|
||||
|
||||
{
|
||||
_x params ["_object", "_varName", "_syncTime", "_idName"];
|
||||
if (ACE_diagTime > _syncTime) then {
|
||||
|
Loading…
Reference in New Issue
Block a user