mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Rallypoints- Don't modify setVar if already set (#5347)
This commit is contained in:
parent
01c17271bc
commit
ef90a069b7
@ -39,8 +39,10 @@ _leaderVarName = _groupUnit getVariable [QGVAR(leaderVarName), ""];
|
||||
if (_leaderVarName != "") exitWith {
|
||||
// assign JIP unit as rallypoint leader
|
||||
if (str _unit == _leaderVarName) then {
|
||||
if (isNil {_unit getVariable "ACE_canMoveRallypoint"}) then {
|
||||
_unit setVariable ["ACE_canMoveRallypoint", true, true];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
// treat group leader
|
||||
@ -61,4 +63,6 @@ if (_leaderVarName == "") then {
|
||||
// prevent group from getting multiple leaders; use this to assign rallypoint moving ability on JIP
|
||||
_groupUnit setVariable [QGVAR(leaderVarName), _leaderVarName];
|
||||
|
||||
_unit setVariable ["ACE_canMoveRallypoint", true, true];
|
||||
if (isNil {_unit getVariable "ACE_canMoveRallypoint"}) then {
|
||||
_unit setVariable ["ACE_canMoveRallypoint", true, true];
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user