added fallback for icons without .paa post-fix

This commit is contained in:
lambdatiger 2024-08-24 21:21:04 -05:00
parent 008606f636
commit dfde14bafc

View File

@ -34,9 +34,13 @@ if (isNil "_cachedValue") then {
if (_vehicleIconValue == "") then {
if (_vehicleValue != "" && {((toLowerANSI _vehicleValue) find ".paa") > -1}) then {
_cachedValue = _vehicleValue;
} else {
if (fileExists (_vehicleValue + ".paa")) then {
_cachedValue = _vehicleValue + ".paa";
} else {
_cachedValue = DEFAULT_TEXTURE;
};
};
} else {
_cachedValue = _vehicleIconValue;
};