Skip to content

Commit

Permalink
Fix #8
Browse files Browse the repository at this point in the history
  • Loading branch information
jetelain committed Sep 19, 2021
1 parent a937376 commit cc73036
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class XtdGearModels
class A
{
texture = "path\to\texture.paa";
// material = = "path\to\material.rvmat"; (default is "\a3\data_f\default.rvmat")
// material = "path\to\material.rvmat"; (if you use material on an option, you MUST set it on all options to avoid undefined behavior)
};
// ...
};
Expand Down
6 changes: 4 additions & 2 deletions addons/gearinfo/functions/fnc_applyTextureOptionOnItem.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ if ( isText _hiddenselection ) then {
if ( _hiddenSelectionIndex == -1 ) exitWith {};

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

};

_target setObjectMaterialGlobal [_hiddenSelectionIndex, _material];
if ( _material != "" ) then {
_target setObjectMaterialGlobal [_hiddenSelectionIndex, _material];
};
_target setObjectTextureGlobal [_hiddenSelectionIndex, _texture];
2 changes: 1 addition & 1 deletion addons/main/script_version.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define MAJOR 0
#define MINOR 4
#define PATCH 0
#define PATCH 1
#define BUILD 0

0 comments on commit cc73036

Please sign in to comment.