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(executePersistent);
|
||||||
PREP(filter);
|
PREP(filter);
|
||||||
PREP(fixLoweredRifleAnimation);
|
PREP(fixLoweredRifleAnimation);
|
||||||
|
PREP(getAllGear);
|
||||||
PREP(getCaptivityStatus);
|
PREP(getCaptivityStatus);
|
||||||
PREP(getConfigCommander);
|
PREP(getConfigCommander);
|
||||||
PREP(getConfigGunner);
|
PREP(getConfigGunner);
|
||||||
|
@ -1,26 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
Name: ACE_Respawn_fnc_getAllGear
|
* Author: bux578
|
||||||
|
*
|
||||||
Author(s):
|
* Returns an array containing all items of a given unit
|
||||||
bux578
|
*
|
||||||
|
* Argument:
|
||||||
Description:
|
* 0: Unit (Object)
|
||||||
returns an array containing all items of a given unit
|
*
|
||||||
|
* Return value:
|
||||||
Parameters:
|
* Array with all the gear
|
||||||
0: OBJECT - unit
|
*/
|
||||||
|
|
||||||
Returns:
|
|
||||||
ARRAY
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_unit", "_allGear"];
|
EXPLODE_1_PVT(_this,_unit);
|
||||||
|
|
||||||
_unit = _this select 0;
|
if (isNull _unit) exitWith {[]};
|
||||||
|
|
||||||
_allGear = [
|
[
|
||||||
(headgear _unit),
|
(headgear _unit),
|
||||||
(goggles _unit),
|
(goggles _unit),
|
||||||
(uniform _unit),
|
(uniform _unit),
|
||||||
@ -40,6 +35,4 @@ _allGear = [
|
|||||||
(handgunMagazine _unit),
|
(handgunMagazine _unit),
|
||||||
(assignedItems _unit),
|
(assignedItems _unit),
|
||||||
(binocular _unit)
|
(binocular _unit)
|
||||||
];
|
]
|
||||||
|
|
||||||
_allGear
|
|
@ -1,7 +1,6 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
PREP(canMoveRallypoint);
|
PREP(canMoveRallypoint);
|
||||||
PREP(getAllGear);
|
|
||||||
PREP(handleKilled);
|
PREP(handleKilled);
|
||||||
PREP(handleRespawn);
|
PREP(handleRespawn);
|
||||||
PREP(initRallypoint);
|
PREP(initRallypoint);
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
/*
|
/*
|
||||||
Name: ACE_Respawn_fnc_handleKilled
|
Name: ACE_Respawn_fnc_handleKilled
|
||||||
|
|
||||||
Author(s):
|
Author(s):
|
||||||
bux578
|
bux578
|
||||||
|
|
||||||
Description:
|
Description:
|
||||||
Handles the XEH Killed event
|
Handles the XEH Killed event
|
||||||
|
|
||||||
Parameters:
|
Parameters:
|
||||||
0: OBJECT - Killed unit
|
0: OBJECT - Killed unit
|
||||||
1: OBJECT - Attacker
|
1: OBJECT - Attacker
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
VOID
|
VOID
|
||||||
*/
|
*/
|
||||||
@ -25,7 +25,7 @@ _killedUnit = _this select 0;
|
|||||||
GVAR(unitGear) = [];
|
GVAR(unitGear) = [];
|
||||||
|
|
||||||
if (GVAR(SavePreDeathGear)) then {
|
if (GVAR(SavePreDeathGear)) then {
|
||||||
GVAR(unitGear) = [_killedUnit] call FUNC(getAllGear);
|
GVAR(unitGear) = [_killedUnit] call EFUNC(common,getAllGear);
|
||||||
};
|
};
|
||||||
|
|
||||||
if (missionNamespace getVariable [QGVAR(showFriendlyFireMessage), false]) then {
|
if (missionNamespace getVariable [QGVAR(showFriendlyFireMessage), false]) then {
|
||||||
|
Loading…
Reference in New Issue
Block a user