2016-05-03 08:21:21 +00:00
|
|
|
#include "script_component.hpp"
|
|
|
|
|
|
|
|
ADDON = false;
|
|
|
|
|
2016-11-23 19:35:25 +00:00
|
|
|
PREP_RECOMPILE_START;
|
2016-05-03 08:21:21 +00:00
|
|
|
#include "XEH_PREP.hpp"
|
2016-11-23 19:35:25 +00:00
|
|
|
PREP_RECOMPILE_END;
|
2016-05-03 08:21:21 +00:00
|
|
|
|
2016-06-12 11:51:23 +00:00
|
|
|
// 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;
|
|
|
|
|
2016-05-03 08:21:21 +00:00
|
|
|
ADDON = true;
|