mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
5cada7d397
* Remove "switchWeapon" spam * Update fnc_startDragLocal.sqf * Don't add invalid fire modes * Tweaks & fix
31 lines
792 B
Plaintext
31 lines
792 B
Plaintext
#include "..\script_component.hpp"
|
|
/*
|
|
* 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
|
|
*/
|
|
|
|
params ["_unit"];
|
|
|
|
// Saves the gear when the player! (and only him) is killed
|
|
if (ACE_player == _unit && {GVAR(SavePreDeathGear)}) then {
|
|
_unit setVariable [QGVAR(unitGear), [_unit] call CBA_fnc_getLoadout];
|
|
_unit setVariable [QGVAR(activeWeaponAndMuzzle), (weaponState _unit) select [0, 3]];
|
|
[QGVAR(saveGear), _unit] call CBA_fnc_localEvent;
|
|
};
|
|
|
|
if (missionNamespace getVariable [QGVAR(showFriendlyFireMessage), false]) then {
|
|
[QGVAR(showFriendlyFireMessageEvent), _this] call CBA_fnc_globalEvent;
|
|
};
|