Skip to content

Commit cc73036

Browse files
committed
Fix #8
1 parent a937376 commit cc73036

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ class XtdGearModels
138138
class A
139139
{
140140
texture = "path\to\texture.paa";
141-
// material = = "path\to\material.rvmat"; (default is "\a3\data_f\default.rvmat")
141+
// material = "path\to\material.rvmat"; (if you use material on an option, you MUST set it on all options to avoid undefined behavior)
142142
};
143143
// ...
144144
};

addons/gearinfo/functions/fnc_applyTextureOptionOnItem.sqf

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ if ( isText _hiddenselection ) then {
2929
if ( _hiddenSelectionIndex == -1 ) exitWith {};
3030

3131
private _texture = getText (_optionDefintion >> _value >> "texture");
32-
private _material = "\a3\data_f\default.rvmat";
32+
private _material = "";
3333
if ( isText (_optionDefintion >> _value >> "material") ) then {
3434
_material = getText (_optionDefintion >> _value >> "material");
3535
};
@@ -55,5 +55,7 @@ if ( _texture == "!INSIGNIA!" ) then {
5555

5656
};
5757

58-
_target setObjectMaterialGlobal [_hiddenSelectionIndex, _material];
58+
if ( _material != "" ) then {
59+
_target setObjectMaterialGlobal [_hiddenSelectionIndex, _material];
60+
};
5961
_target setObjectTextureGlobal [_hiddenSelectionIndex, _texture];

addons/main/script_version.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#define MAJOR 0
22
#define MINOR 4
3-
#define PATCH 0
3+
#define PATCH 1
44
#define BUILD 0

0 commit comments

Comments
 (0)