Fixed error pop-up kicking you out of game in case a third party vehicle has incorrect configured hitpoints/selections

This commit is contained in:
Glowbal 2015-08-16 00:15:16 +02:00
parent 508c6de2cb
commit 0420f0b216

View File

@ -41,14 +41,15 @@ _hitpointClasses = [_config >> "HitPoints"];
while {isClass _class} do {
for "_i" from 0 to (count _class - 1) do {
private ["_entry", "_selection"];
if (isClass (_class select _i)) then {
private ["_entry", "_selection"];
_entry = configName (_class select _i);
_selection = getText (_class select _i >> "name");
_entry = configName (_class select _i);
_selection = getText (_class select _i >> "name");
if (!(_selection in _selections) && {!isNil {_vehicle getHit _selection}}) then {
_hitpoints pushBack _entry;
_selections pushBack _selection;
if (!(_selection in _selections) && {!isNil {_vehicle getHit _selection}}) then {
_hitpoints pushBack _entry;
_selections pushBack _selection;
};
};
};