Files
DayZ-Epoch/dayz_code/compile/vehicle_getHitpoints.sqf
Aaron Clark 76e9a0582e 0.1
2012-11-04 20:28:50 -06:00

26 lines
529 B
Plaintext

private ["_cfgHitPoints", "_hps", "_funcGetHitPoints"];
_cfgHitPoints = configFile >> "CfgVehicles" >> (typeOf _this) >> "HitPoints";
_hps = [];
_funcGetHitPoints =
{
for "_i" from 0 to ((count _this) - 1) do
{
private ["_hp"];
_hp = configName (_this select _i);
if (!(_hp in _hps)) then
{
_hps set [count _hps, _hp];
};
};
};
//Explore inheritance structure fully
while {(configName _cfgHitPoints) != ""} do
{
_cfgHitPoints call _funcGetHitPoints;
_cfgHitPoints = inheritsFrom _cfgHitPoints;
};
_hps