Make sure it's at least a valid path before we spend time searching

This commit is contained in:
lambdatiger 2024-08-24 21:36:48 -05:00
parent dfde14bafc
commit 2d7a9454e3

View File

@ -35,7 +35,7 @@ if (isNil "_cachedValue") then {
if (_vehicleValue != "" && {((toLowerANSI _vehicleValue) find ".paa") > -1}) then {
_cachedValue = _vehicleValue;
} else {
if (fileExists (_vehicleValue + ".paa")) then {
if (_vehicleValue select [0,1] == "\" && {fileExists (_vehicleValue + ".paa")}) then {
_cachedValue = _vehicleValue + ".paa";
} else {
_cachedValue = DEFAULT_TEXTURE;