Moved getAllGear function to common module

This commit is contained in:
Nicolás Badano 2015-01-16 15:24:25 -03:00
parent 7883389a53
commit 8467013c1a
4 changed files with 20 additions and 27 deletions

View File

@ -38,6 +38,7 @@ PREP(execRemoteFnc);
PREP(executePersistent);
PREP(filter);
PREP(fixLoweredRifleAnimation);
PREP(getAllGear);
PREP(getCaptivityStatus);
PREP(getConfigCommander);
PREP(getConfigGunner);

View File

@ -1,26 +1,21 @@
/*
Name: ACE_Respawn_fnc_getAllGear
Author(s):
bux578
Description:
returns an array containing all items of a given unit
Parameters:
0: OBJECT - unit
Returns:
ARRAY
*/
* Author: bux578
*
* Returns an array containing all items of a given unit
*
* Argument:
* 0: Unit (Object)
*
* Return value:
* Array with all the gear
*/
#include "script_component.hpp"
private ["_unit", "_allGear"];
EXPLODE_1_PVT(_this,_unit);
_unit = _this select 0;
if (isNull _unit) exitWith {[]};
_allGear = [
[
(headgear _unit),
(goggles _unit),
(uniform _unit),
@ -40,6 +35,4 @@ _allGear = [
(handgunMagazine _unit),
(assignedItems _unit),
(binocular _unit)
];
_allGear
]

View File

@ -1,7 +1,6 @@
#include "script_component.hpp"
PREP(canMoveRallypoint);
PREP(getAllGear);
PREP(handleKilled);
PREP(handleRespawn);
PREP(initRallypoint);

View File

@ -25,7 +25,7 @@ _killedUnit = _this select 0;
GVAR(unitGear) = [];
if (GVAR(SavePreDeathGear)) then {
GVAR(unitGear) = [_killedUnit] call FUNC(getAllGear);
GVAR(unitGear) = [_killedUnit] call EFUNC(common,getAllGear);
};
if (missionNamespace getVariable [QGVAR(showFriendlyFireMessage), false]) then {