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
|
|
|
#include "script_component.hpp"
|
|
|
|
|
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 {
|
|
|
|
_unit setVariable [QGVAR(unitGear), getUnitLoadout _unit];
|
|
|
|
_unit setVariable [QGVAR(activeWeaponAndMuzzle), [currentWeapon _unit, currentMuzzle _unit, currentWeaponMode _unit]];
|
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
|
|
|
};
|