ACE3/addons/common/functions/fnc_getHitPointsWithSelections.sqf
PabstMirror 4e93b9c72d 2307 - Repair sub-turrets
Privates

Cleanup debug

Add repair actions for sub turrets

Cleanup

Fix Header

Error Handling

Cleanup setHitpointDamage

Fix common ACE_isEngineer to handle scalar or bool

Claim and release repair objects (wheel/track)

Repair sub-turrets
2015-11-20 21:11:05 -06:00

33 lines
763 B
Plaintext

/*
* Author: commy2
* Returns all hitpoints and their respective selections of any vehicle. Might contain duplicates for non unique hitpoints in turrets.
*
* Arguments:
* 0: Vehicle <OBJECT>
*
* Return Value:
* 0: Hitpoints <ARRAY>
* 1: Selections <ARRAY>
*
* Public: Yes
*
* Deprecated
*/
#include "script_component.hpp"
ACE_DEPRECATED("ace_common_fnc_getHitPointsWithSelections","3.5.0","getAllHitPointsDamage");
params ["_vehicle"];
private "_hitPointsWithSelections";
_hitPointsWithSelections = getAllHitPointsDamage _vehicle;
// get correct format on vehicles without any hitpoints
if (_hitPointsWithSelections isEqualTo []) then {
_hitPointsWithSelections = [[],[],[]];
};
_hitPointsWithSelections resize 2;
_hitPointsWithSelections