mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
26 lines
675 B
Plaintext
26 lines
675 B
Plaintext
#include "script_component.hpp"
|
|
|
|
ADDON = false;
|
|
|
|
#include "XEH_PREP.hpp"
|
|
|
|
// 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;
|
|
|
|
ADDON = true;
|