mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
12 lines
451 B
Plaintext
12 lines
451 B
Plaintext
private["_hitpoints", "_type", "_cachekey", "_na"];
|
|
_hitpoints = [];
|
|
if (!isNull _this) then {
|
|
_type = typeOf _this;
|
|
_cachekey = format["%1_HP", _type];
|
|
_hitpoints = missionNamespace getVariable[_cachekey, []];
|
|
if (_hitpoints isEqualTo []) then {
|
|
_na = configProperties[configFile >> "CfgVehicles" >> _type >> "HitPoints", "_hitpoints pushBack configName _x; true", true];
|
|
missionNamespace setVariable[_cachekey, _hitpoints];
|
|
};
|
|
};
|
|
_hitpoints |