2015-01-12 09:07:03 +00:00
|
|
|
/*
|
2015-01-12 09:49:21 +00:00
|
|
|
Name: ACE_Respawn_fnc_handleKilled
|
2015-01-16 18:24:25 +00:00
|
|
|
|
2015-01-12 09:07:03 +00:00
|
|
|
Author(s):
|
|
|
|
bux578
|
2015-01-16 18:24:25 +00:00
|
|
|
|
2015-01-12 09:07:03 +00:00
|
|
|
Description:
|
|
|
|
Handles the XEH Killed event
|
2015-01-16 18:24:25 +00:00
|
|
|
|
2015-01-12 09:07:03 +00:00
|
|
|
Parameters:
|
|
|
|
0: OBJECT - Killed unit
|
|
|
|
1: OBJECT - Attacker
|
2015-01-16 18:24:25 +00:00
|
|
|
|
2015-01-12 09:07:03 +00:00
|
|
|
Returns:
|
|
|
|
VOID
|
|
|
|
*/
|
|
|
|
|
2015-01-12 10:24:58 +00:00
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-06-04 12:30:38 +00:00
|
|
|
PARAMS_1(_killedUnit);
|
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
|
|
|
|
if (ACE_player == _killedUnit) then {
|
|
|
|
GVAR(unitGear) = [];
|
2015-01-12 09:07:03 +00:00
|
|
|
|
2015-06-04 12:30:38 +00:00
|
|
|
if (GVAR(SavePreDeathGear)) then {
|
|
|
|
GVAR(unitGear) = [_killedUnit] call EFUNC(common,getAllGear);
|
|
|
|
};
|
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
|
|
|
};
|