File tree Expand file tree Collapse file tree 3 files changed +11
-7
lines changed
Expand file tree Collapse file tree 3 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -173,8 +173,9 @@ static func load(path: String):
173173
174174 if material is ShaderMaterial :
175175 var mat : ShaderMaterial = material ;
176- if uniforms .find (key ) > - 1 :
177- var is_texture = value .has ("/" );
176+ var uniform_index : int = uniforms .find_custom (func (uniform ): return uniform .name == key );
177+ if uniform_index > - 1 :
178+ var is_texture = uniforms [uniform_index ].hint_string == "Texture2D" ;
178179 mat .set_shader_parameter (key , VTFLoader .get_texture (value ) if is_texture else value );
179180 continue ;
180181
Original file line number Diff line number Diff line change 33name =" GodotVMF"
44description =" Allows use VMF files in Godot"
55author =" H2xDev"
6- version =" 2.1.7 "
6+ version =" 2.1.8 "
77script =" godotvmf.gd"
Original file line number Diff line number Diff line change 11@tool
22class_name ValveIONode extends Node3D ;
33
4- static var named_entities = {};
4+ static var named_entities : = {};
55static var scene_instance : Node = null ;
66
77## Assigns global targetname for the node
88static func define_alias (name : String , value : Node ):
9- if name == '!self' or name in aliases :
9+ if name == '!self' :
1010 VMFLogger .error ('The alias "' + name + '" is already defined' );
1111 return ;
1212
1313 aliases [name ] = value ;
1414
15+ static func remove_alias (name : String ):
16+ if name in aliases :
17+ aliases .erase (name );
18+
1519@export var entity := {};
1620@export var enabled := true ;
1721@export var flags : int = 0 ;
1822
19- var config :
20- get : return VMFConfig ;
23+ var config := VMFConfig ;
2124
2225static var aliases : Dictionary = {};
2326
You can’t perform that action at this time.
0 commit comments