Skip to content

Commit

Permalink
Fixed issue were arsenal whitelist were not created on first load to …
Browse files Browse the repository at this point in the history
…server
  • Loading branch information
AndreasBrostrom committed Apr 12, 2024
1 parent 5b21b0f commit f1bea80
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
15 changes: 0 additions & 15 deletions cScripts/functions/gear/fn_gear_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,4 @@ if (isServer) then {
} else {
SHOW_CHAT_WARNING("Gear_PostInit", "Mission in singelplayer environment radio setup will not be performed");
};
};

if (hasInterface) then {
["ace_arsenal_displayClosed", {
player call EFUNC(gear,saveLoadout);
}] call CBA_fnc_addEventHandler;

[QEGVAR(gear,applyLoadout), {
_this params [
["_unit", objNull, [objNull]],
["_loadout", "", [""]]
];
_loadout = if (_loadout == "") then {[_unit] call EFUNC(gear,selectLoadout)} else {_loadout};
[_unit, _loadout] call EFUNC(gear,applyLoadout);
}] call CBA_fnc_addEventHandler;
};
15 changes: 15 additions & 0 deletions cScripts/functions/gear/fn_gear_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,21 @@ GVAR(Gear) = false;
EGVAR(gear,groupIDsSynched) = false;
EGVAR(gear,playerLoadoutGiven) = false;

if (hasInterface) then {
["ace_arsenal_displayClosed", {
player call EFUNC(gear,saveLoadout);
}] call CBA_fnc_addEventHandler;

[QEGVAR(gear,applyLoadout), {
_this params [
["_unit", objNull, [objNull]],
["_loadout", "", [""]]
];
_loadout = if (_loadout == "") then {[_unit] call EFUNC(gear,selectLoadout)} else {_loadout};
[_unit, _loadout] call EFUNC(gear,applyLoadout);
}] call CBA_fnc_addEventHandler;
};

if (isClass (missionConfigFile >> "CfgLoadouts")) then {
["CAManBase", "InitPost", {
params ["_unit"];
Expand Down

0 comments on commit f1bea80

Please sign in to comment.