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:
@ -21,11 +21,13 @@ params ["_object", "_varName", "_value", ["_sync", 1]];
|
|||||||
// set value locally
|
// set value locally
|
||||||
_object setVariable [_varName, _value];
|
_object setVariable [_varName, _value];
|
||||||
|
|
||||||
// Exit Dedicated server and headless Clients
|
// Exit if in SP
|
||||||
if (!hasInterface) exitWith {};
|
if (!isMultiplayer) exitWith {};
|
||||||
|
|
||||||
private ["_idName", "_syncTime"];
|
private ["_idName", "_syncTime"];
|
||||||
|
|
||||||
|
_idName = format ["ACE_setVariablePublic_%1", _varName];
|
||||||
|
|
||||||
if (_idName in GVAR(setVariableNames)) exitWith {};
|
if (_idName in GVAR(setVariableNames)) exitWith {};
|
||||||
|
|
||||||
_syncTime = ACE_diagTime + _sync;
|
_syncTime = ACE_diagTime + _sync;
|
||||||
@ -39,6 +41,7 @@ if (isNil QGVAR(setVariablePublicPFH)) exitWith {};
|
|||||||
GVAR(setVariablePublicPFH) = [{
|
GVAR(setVariablePublicPFH) = [{
|
||||||
private "_delete";
|
private "_delete";
|
||||||
_delete = 0;
|
_delete = 0;
|
||||||
|
|
||||||
{
|
{
|
||||||
_x params ["_object", "_varName", "_syncTime", "_idName"];
|
_x params ["_object", "_varName", "_syncTime", "_idName"];
|
||||||
if (ACE_diagTime > _syncTime) then {
|
if (ACE_diagTime > _syncTime) then {
|
||||||
|
Reference in New Issue
Block a user