CSW/Dragging - Handle null objects causing script errors (#9529)

* CSW - Handle static weapon be deleted

* add same fix to dragging
This commit is contained in:
PabstMirror 2023-10-18 21:17:07 -05:00 committed by GitHub
parent 902e365536
commit d70c049b4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -16,6 +16,7 @@
*/
params ["_staticWeapon"];
if (isNull _staticWeapon) exitWith { WARNING_1("%1 became null",_staticWeapon) };
private _typeOf = typeOf _staticWeapon;
private _configOf = configOf _staticWeapon;
private _configEnabled = (getNumber (_configOf >> "ace_csw" >> "enabled")) == 1;

View File

@ -16,6 +16,7 @@
*/
params ["_unit"];
if (isNull _unit) exitWith { WARNING_1("%1 became null",_unit) };
[_unit, true, [0, 1.1, 0.092], 180] call FUNC(setDraggable);
[_unit, true, [0.4, -0.1, -1.25], 195] call FUNC(setCarryable); // Hard-coded selection: "LeftShoulder"