mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
replace usage of setCaptive with camouflageCoef trait
This commit is contained in:
parent
53d382a4f5
commit
1890c71c65
@ -38,7 +38,16 @@
|
||||
[QGVAR(setCaptive), {
|
||||
params ["_object", "_set"];
|
||||
TRACE_2("setCaptive EH",_object,_set);
|
||||
_object setCaptive (_set > 0);
|
||||
private _visibility = _object getUnitTrait "camouflageCoef";
|
||||
if (_set > 0) then {
|
||||
if (_visibility != 0) then {
|
||||
_object setVariable [QGVAR(oldVisibility), _visibility];
|
||||
_object setUnitTrait ["camouflageCoef", 0];
|
||||
};
|
||||
} else {
|
||||
_visibility = _unit getVariable [QGVAR(oldVisibility), _visibility];
|
||||
_object setUnitTrait ["camouflageCoef", _visibility];
|
||||
};
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
[QGVAR(blockDamage), { //Name reversed from `allowDamage` because we want NOR logic
|
||||
params ["_object", "_set"];
|
||||
|
Loading…
Reference in New Issue
Block a user