2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
2015-01-12 09:07:03 +00:00
|
|
|
/*
|
2015-09-26 14:26:41 +00:00
|
|
|
* Author: bux578
|
|
|
|
* Handles the XEH killed event.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Unit <OBJECT>
|
|
|
|
* 1: Killer <OBJECT>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* [ACE_player, bad_dude] call ace_respawn_fnc_handleKilled
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
2015-01-12 10:24:58 +00:00
|
|
|
|
2015-09-26 14:26:41 +00:00
|
|
|
params ["_unit"];
|
2015-01-12 09:07:03 +00:00
|
|
|
|
2015-06-04 12:30:38 +00:00
|
|
|
// Saves the gear when the player! (and only him) is killed
|
2016-05-14 08:49:09 +00:00
|
|
|
if (ACE_player == _unit && {GVAR(SavePreDeathGear)}) then {
|
2022-08-25 16:56:54 +00:00
|
|
|
_unit setVariable [QGVAR(unitGear), [_unit] call CBA_fnc_getLoadout];
|
2024-07-20 06:13:42 +00:00
|
|
|
_unit setVariable [QGVAR(activeWeaponAndMuzzle), (weaponState _unit) select [0, 3]];
|
2020-04-04 15:24:59 +00:00
|
|
|
[QGVAR(saveGear), _unit] call CBA_fnc_localEvent;
|
2015-01-12 09:07:03 +00:00
|
|
|
};
|
|
|
|
|
2015-01-12 09:49:21 +00:00
|
|
|
if (missionNamespace getVariable [QGVAR(showFriendlyFireMessage), false]) then {
|
2016-06-03 00:59:18 +00:00
|
|
|
[QGVAR(showFriendlyFireMessageEvent), _this] call CBA_fnc_globalEvent;
|
2015-01-12 09:07:03 +00:00
|
|
|
};
|