heheh
This commit is contained in:
@@ -97,6 +97,16 @@ func _on_enemy_died(killer_id: int):
|
||||
if _mesh:
|
||||
_mesh.visible = false
|
||||
|
||||
# Disable collision so players can walk through
|
||||
var collision_shape = get_node_or_null("CollisionShape3D")
|
||||
if collision_shape:
|
||||
collision_shape.disabled = true
|
||||
|
||||
# Disable hurtbox
|
||||
var hurtbox = get_node_or_null("HurtBox")
|
||||
if hurtbox:
|
||||
hurtbox.monitorable = false
|
||||
|
||||
print("[PracticeDummy] Killed by player ", killer_id, ". Respawning in ", respawn_delay, " seconds...")
|
||||
|
||||
## Override respawn to show mesh again
|
||||
@@ -108,5 +118,15 @@ func _on_enemy_respawned():
|
||||
_mesh.visible = true
|
||||
_reset_material()
|
||||
|
||||
# Re-enable collision
|
||||
var collision_shape = get_node_or_null("CollisionShape3D")
|
||||
if collision_shape:
|
||||
collision_shape.disabled = false
|
||||
|
||||
# Re-enable hurtbox
|
||||
var hurtbox = get_node_or_null("HurtBox")
|
||||
if hurtbox:
|
||||
hurtbox.monitorable = true
|
||||
|
||||
_update_health_display()
|
||||
print("[PracticeDummy] Respawned!")
|
||||
|
||||
Reference in New Issue
Block a user