Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- span class="re5"> params [["_veh", objNull, [objNull]]];
- if (isNull _veh) exitWith {};
- if !(_veh isKindOf "LandVehicle") exitWith {};
- getRoadInfo roadAt _veh params ["", "", "", "_roadTexture", "", "", "", "", "_isBridge"];
- if (_isBridge) exitWith {};
- if (isNil {_veh getVariable "CAMO_defaultTextures"}) then {
- _veh setVariable ["CAMO_defaultTextures", getArray(configfile >> "CfgVehicles" >> typeOf _veh >> "hiddenSelectionsTextures")];
- };
- private _newTextures = _veh getVariable ["CAMO_defaultTextures", ["#(rgb,8,8,3)color(1,0,0,1)"]];
- if (
- _roadTexture == "" ||
- {"beton.paa" in toLower _roadTexture} ||
- {"surf_roadconcrete_co.paa" in toLower _roadTexture}
- ) then {
- _roadTexture = surfaceTexture getPosATL _veh;
- };
- if (_roadTexture != "") then {
- _newTextures = _newTextures apply {_roadTexture};
- };
- // Only apply textures if they changed
- if (_newTextures isNotEqualTo getObjectTextures _veh) then {
- { _veh setObjectTextureGlobal [_forEachIndex, _x] } forEach _newTextures;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement