mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
1994e301fd
* Compile stats on preInit * Remove uneeded check in add/removeStat * Remove perf profiler vars They aren't required anymore * Fix case issue in verifyLoadout, remove uneeded line * Fix ace arsenal cam not working porperly underwater By removing those checks the cam is allowed to clip through objects and work properly underwater, sounds like features to me :D * Fix gunbag behavior in ace arsenal Switching between gunbags will keep the weapon, switching to another backpack then back to a gunbag will also keep the weapon. * Fix text scaling in the searchbars and loadout name edit boxes Also made the text bigger by default
46 lines
1.2 KiB
Plaintext
46 lines
1.2 KiB
Plaintext
#include "script_component.hpp"
|
|
|
|
ADDON = false;
|
|
|
|
PREP_RECOMPILE_START;
|
|
#include "XEH_PREP.hpp"
|
|
PREP_RECOMPILE_END;
|
|
|
|
// restore gunbag info after respawn
|
|
["CAManBase", "respawn", {
|
|
[{
|
|
params ["_unit", "_corpse"];
|
|
|
|
private _newBackpack = backpackContainer _unit;
|
|
private _oldBackpack = backpackContainer _corpse;
|
|
|
|
if !(typeOf _newBackpack isEqualTo typeOf _oldBackpack) exitWith {};
|
|
|
|
private _state = _oldBackpack getVariable [QGVAR(gunbagWeapon), []];
|
|
|
|
if !(_state isEqualTo []) then {
|
|
_newBackpack setVariable [QGVAR(gunbagWeapon), _state, true];
|
|
};
|
|
}, _this] call CBA_fnc_execNextFrame;
|
|
}] call CBA_fnc_addClassEventHandler;
|
|
|
|
[QEGVAR(arsenal,displayOpened), {
|
|
|
|
private _center = EGVAR(arsenal,center);
|
|
|
|
if (_center call FUNC(hasGunBag)) then {
|
|
GVAR(arsenalCache) = (backpackContainer _center) getVariable [QGVAR(gunbagWeapon), []];
|
|
};
|
|
}] call CBA_fnc_addEventHandler;
|
|
|
|
[QEGVAR(arsenal,displayClosed), {
|
|
|
|
if !(isNil QGVAR(arsenalCache)) then {
|
|
(backpackContainer EGVAR(arsenal,center)) setVariable [QGVAR(gunbagWeapon),GVAR(arsenalCache), true];
|
|
};
|
|
|
|
GVAR(arsenalCache) = nil;
|
|
}] call CBA_fnc_addEventHandler;
|
|
|
|
ADDON = true;
|