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
|
2015-09-26 14:26:41 +00:00
|
|
|
if (ACE_player == _unit) then {
|
2015-06-04 12:30:38 +00:00
|
|
|
GVAR(unitGear) = [];
|
2015-01-12 09:07:03 +00:00
|
|
|
|
2015-06-04 12:30:38 +00:00
|
|
|
if (GVAR(SavePreDeathGear)) then {
|
2015-09-26 14:26:41 +00:00
|
|
|
GVAR(unitGear) = [_unit] call EFUNC(common,getAllGear);
|
2015-10-03 23:26:38 +00:00
|
|
|
GVAR(unitGear) append [currentWeapon _unit, currentMuzzle _unit, currentWeaponMode _unit];
|
2015-06-04 12:30:38 +00:00
|
|
|
};
|
2015-01-12 09:07:03 +00:00
|
|
|
};
|
|
|
|
|
2015-01-12 09:49:21 +00:00
|
|
|
if (missionNamespace getVariable [QGVAR(showFriendlyFireMessage), false]) then {
|
2015-04-19 05:08:57 +00:00
|
|
|
[_this, QUOTE(DFUNC(showFriendlyFireMessage)), 2] call EFUNC(common,execRemoteFnc);
|
2015-01-12 09:07:03 +00:00
|
|
|
};
|