2017-11-07 21:21:58 +00:00
|
|
|
/*
|
|
|
|
* Author: unknown
|
|
|
|
* Called when a unit is Respawned
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: The Unit <OBJECT>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* [bob] call ACE_rearm_fnc_handleRespawn
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
2015-08-16 21:52:37 +00:00
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2016-09-04 14:44:22 +00:00
|
|
|
params ["_unit"];
|
2015-08-16 21:52:37 +00:00
|
|
|
if !(local _unit) exitWith {};
|
|
|
|
|
|
|
|
_unit setVariable [QGVAR(selectedWeaponOnRearm), nil];
|
|
|
|
_unit setVariable [QGVAR(carriedMagazine), nil];
|
2016-09-04 14:44:22 +00:00
|
|
|
private _dummy = _unit getVariable [QGVAR(dummy), objNull];
|
2015-08-16 21:52:37 +00:00
|
|
|
if !(isNull _dummy) then {
|
|
|
|
detach _dummy;
|
|
|
|
deleteVehicle _dummy;
|
|
|
|
};
|
2016-05-12 12:55:40 +00:00
|
|
|
_unit setVariable [QGVAR(dummy), nil];
|