player: add check before unequipping gear

This commit is contained in:
Jeremy Baxter 2026-01-24 12:41:10 +13:00
parent 73fe669f57
commit cda93d8177

View file

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