From dfde14bafcd880c5132c03b7d07c01fb05e3c6a7 Mon Sep 17 00:00:00 2001 From: lambdatiger Date: Sat, 24 Aug 2024 21:21:04 -0500 Subject: [PATCH] added fallback for icons without .paa post-fix --- addons/common/functions/fnc_getVehicleIcon.sqf | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/addons/common/functions/fnc_getVehicleIcon.sqf b/addons/common/functions/fnc_getVehicleIcon.sqf index c63d54a8d8..a55417f303 100644 --- a/addons/common/functions/fnc_getVehicleIcon.sqf +++ b/addons/common/functions/fnc_getVehicleIcon.sqf @@ -35,7 +35,11 @@ if (isNil "_cachedValue") then { if (_vehicleValue != "" && {((toLowerANSI _vehicleValue) find ".paa") > -1}) then { _cachedValue = _vehicleValue; } else { - _cachedValue = DEFAULT_TEXTURE; + if (fileExists (_vehicleValue + ".paa")) then { + _cachedValue = _vehicleValue + ".paa"; + } else { + _cachedValue = DEFAULT_TEXTURE; + }; }; } else { _cachedValue = _vehicleIconValue;