player: add check before unequipping gear

This commit is contained in:
Jeremy Baxter 2026-01-24 12:41:10 +13:00
parent ab8e597889
commit 6342b751f8

View file

@ -65,8 +65,9 @@ func die():
# strip gears
for gear in $Backpack.get_children():
gear.queue_free()
$Pivot/Container/Gear.unequip(self)
$Pivot/Container/Gear.queue_free()
if has_node("Pivot/Container/Gear"):
$Pivot/Container/Gear.unequip(self)
$Pivot/Container/Gear.queue_free()
$RespawnTimer.start()
message("Le gone")