Skip to content

Commit

Permalink
CSW - Delay init for CSW with simulation disabled (#9778)
Browse files Browse the repository at this point in the history
Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>
  • Loading branch information
LinkIsGrim and johnb432 authored Feb 7, 2024
1 parent 1649422 commit 802560d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion addons/csw/functions/fnc_staticWeaponInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
*/

params ["_staticWeapon"];
if (isNull _staticWeapon) exitWith { WARNING_1("%1 became null",_staticWeapon) };
if (!alive _staticWeapon) exitWith { WARNING_1("%1 not alive",_staticWeapon); };
if (!simulationEnabled _staticWeapon) exitWith {
[{simulationEnabled _this}, FUNC(staticWeaponInit), _staticWeapon] call CBA_fnc_waitUntilAndExecute;
};
private _typeOf = typeOf _staticWeapon;
private _configOf = configOf _staticWeapon;
private _configEnabled = (getNumber (_configOf >> "ace_csw" >> "enabled")) == 1;
Expand Down

0 comments on commit 802560d

Please sign in to comment.