File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313 release :
1414 if : github.event_name == 'push' || (github.event.pull_request.merged == true)
1515 runs-on : ubuntu-latest
16+ permissions : write-all
1617
1718 steps :
1819 - name : Checkout repository
Original file line number Diff line number Diff line change @@ -164,13 +164,8 @@ func generate_collision():
164164
165165 var static_body : StaticBody3D = StaticBody3D .new ();
166166 var collision : CollisionShape3D = CollisionShape3D .new ();
167+ var shape : ConvexPolygonShape3D = ConvexPolygonShape3D .new ();
167168
168- # FIXME: Use ConvexPolygonShape3D instead of ConcavePolygonShape3D
169- # but if it used then for some models it triggers an error
170- # "Failed to build convex hull godot"
171- var shape : ConcavePolygonShape3D = ConcavePolygonShape3D .new ();
172-
173- collision .shape = shape ;
174169 collision .name = "collision_" + str (surface_index ) + "_" + str (solid_index );
175170 static_body .name = "solid_" + str (surface_index ) + "_" + str (solid_index );
176171 static_body .basis *= additional_basis ;
@@ -184,7 +179,9 @@ func generate_collision():
184179
185180 vertices .append_array ([v1 , v2 , v3 ]);
186181
187- collision .shape .set_faces (PackedVector3Array (vertices ));
182+ shape .points = PackedVector3Array (vertices );
183+ collision .shape = shape ;
184+
188185 if skeleton and skeleton .find_bone ("static_body" ) == - 1 :
189186 var bone_attachment : BoneAttachment3D = BoneAttachment3D .new ();
190187 bone_attachment .name = "bone_attachment_" + str (surface_index ) + "_" + str (solid_index );
Original file line number Diff line number Diff line change 33name =" GodotVMF"
44description =" Allows use VMF files in Godot"
55author =" H2xDev"
6- version =" 2.2.8 "
6+ version =" 2.2.9 "
77script =" godotvmf.gd"
Original file line number Diff line number Diff line change @@ -97,7 +97,11 @@ class ImportConfig:
9797 ## If specified, the importer will use this preset for the navigation mesh
9898 var navigation_mesh_preset : String = ProjectSettings .get_setting ("godot_vmf/import/navigation_mesh_preset" , "" );
9999
100- static var gameinfo_path : String = ProjectSettings .get_setting ("godot_vmf/import/gameinfo_path" , "res://" );
100+ var gameinfo_path : String = ProjectSettings .get_setting ("godot_vmf/import/gameinfo_path" , "res://" );
101+
102+ ## NOTE: Support previous version of this config where this field wasn't a part of ImportConfig
103+ static var gameinfo_path : String :
104+ get : return ProjectSettings .get_setting ("godot_vmf/import/gameinfo_path" , "res://" );
101105
102106static var models : ModelsConfig :
103107 get :
Original file line number Diff line number Diff line change @@ -31,13 +31,13 @@ static func for_resource_import() -> void:
3131## Returns true if any resources were imported
3232static func import_models (vmf_structure : VMFStructure ) -> bool :
3333 if not VMFConfig .models .import : return false ;
34- if not "entity" in vmf_structure : return false ;
34+ if vmf_structure . entities . size () == 0 : return false ;
3535
36- for entity in vmf_structure .entity :
37- if not "model" in entity : continue ;
36+ for entity in vmf_structure .entities :
37+ if not "model" in entity . data : continue ;
3838 if entity .classname != "prop_static" : continue ;
3939
40- var model_path = entity .get ("model" , "" ).to_lower ().get_basename ();
40+ var model_path = entity .data . get ("model" , "" ).to_lower ().get_basename ();
4141 if not model_path : continue ;
4242
4343 var mdl_path = VMFUtils .normalize_path (VMFConfig .gameinfo_path + "/" + model_path + ".mdl" );
You can’t perform that action at this time.
0 commit comments