mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Moved getAllGear function to common module
This commit is contained in:
parent
7883389a53
commit
8467013c1a
@ -38,6 +38,7 @@ PREP(execRemoteFnc);
|
||||
PREP(executePersistent);
|
||||
PREP(filter);
|
||||
PREP(fixLoweredRifleAnimation);
|
||||
PREP(getAllGear);
|
||||
PREP(getCaptivityStatus);
|
||||
PREP(getConfigCommander);
|
||||
PREP(getConfigGunner);
|
||||
|
@ -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
|
||||
]
|
@ -1,7 +1,6 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
PREP(canMoveRallypoint);
|
||||
PREP(getAllGear);
|
||||
PREP(handleKilled);
|
||||
PREP(handleRespawn);
|
||||
PREP(initRallypoint);
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user