Fix blaster GLB root type error (Node3D, not MeshInstance3D)
- Changed _gun_model type from MeshInstance3D to Node3D (all imported GLB/GLTF weapon models have Node3D root) - Added check_models.gd diagnostic script The type mismatch at WeaponManager._load_weapon_models:73 was the only script error in the user's game.log. Headless bot tests confirm movement still works fine.
This commit is contained in:
@@ -26,7 +26,7 @@ var _pending_grenades: Array[Dictionary] = [] # Buffered throws, consumed in _a
|
||||
|
||||
# Weapon models (loaded at runtime)
|
||||
var _knife_model: Node3D
|
||||
var _gun_model: MeshInstance3D
|
||||
var _gun_model: Node3D
|
||||
var _grenade_model: Node3D
|
||||
var _current_visible_slot: int = -1
|
||||
var _knife_sound: AudioStreamPlayer3D
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env -S godot --headless --script
|
||||
extends SceneTree
|
||||
|
||||
func _init():
|
||||
var paths = [
|
||||
"res://assets/kenney/models/blaster.glb",
|
||||
"res://examples/multiplayer-fps/models/knife.fbx",
|
||||
"res://examples/multiplayer-fps/models/grenade.glb",
|
||||
]
|
||||
for p in paths:
|
||||
var scene = load(p)
|
||||
if scene:
|
||||
var inst = scene.instantiate()
|
||||
print(p, " -> type: ", inst.get_class(), " children: ", inst.get_child_count())
|
||||
for c in inst.get_children():
|
||||
print(" child: ", c.get_class(), " ", c.name)
|
||||
inst.queue_free()
|
||||
else:
|
||||
print(p, " -> FAILED TO LOAD")
|
||||
quit()
|
||||
@@ -0,0 +1 @@
|
||||
uid://c2m50xd561do8
|
||||
Reference in New Issue
Block a user