Vehicle Damage - Use "objectCurators" (#8587)

* Vehicle Damage - Use "objectCurators"

Micro-optimization. Approximately 4x faster compared to previous method (0.0063 vs 0.0012 ms).

* Remove extra whitespace

* Removed extraneous isNotEqualTo check

* Corrected missing array

* Update addons/vehicle_damage/XEH_postInit.sqf

Co-authored-by: jonpas <jonpas33@gmail.com>

Co-authored-by: PabstMirror <pabstmirror@gmail.com>
Co-authored-by: jonpas <jonpas33@gmail.com>
This commit is contained in:
Zman6258 2021-10-26 19:09:04 -04:00 committed by GitHub
parent 7b32edff09
commit 48005f08ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -45,10 +45,8 @@
params ["_vehicle", "_turret"]; params ["_vehicle", "_turret"];
{ {
if (_vehicle in curatorEditableObjects _x) then { _x addCuratorEditableObjects [[_turret], false];
_x addCuratorEditableObjects [[_turret], false]; } forEach (objectCurators _vehicle);
};
} forEach allCurators;
}] call CBA_fnc_addEventHandler; }] call CBA_fnc_addEventHandler;
}; };
}; };