mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fixed client setting Draw3D installation/removal handling
This commit is contained in:
parent
1ccc7e1e0a
commit
02b9df1bc3
@ -33,12 +33,13 @@ if (!GVAR(showPlayerNamesForce)) then {
|
||||
["SettingChanged", {
|
||||
PARAMS_2(_name,_value)
|
||||
if (_name == QGVAR(showPlayerNames)) then {
|
||||
if ((GVAR(showPlayerNames) > 0) && (_value == 0)) then {
|
||||
removeMissionEventHandler ["Draw3D", GVAR(drawHandler)];
|
||||
GVAR(drawHandler) = nil;
|
||||
};
|
||||
if ((GVAR(showPlayerNames) == 0) && (_value > 0)) then {
|
||||
if (isNil(QGVAR(drawHandler)) && {_value > 0}) then {
|
||||
GVAR(drawHandler) = addMissionEventHandler ["Draw3D", {_this call FUNC(onDraw3d);}];
|
||||
} else {
|
||||
if (_value == 0) then {
|
||||
removeMissionEventHandler ["Draw3D", GVAR(drawHandler)];
|
||||
GVAR(drawHandler) = nil;
|
||||
};
|
||||
};
|
||||
};
|
||||
}] call EFUNC(common,addEventHandler);
|
||||
|
Loading…
Reference in New Issue
Block a user