player: add check before unequipping gear
This commit is contained in:
parent
ab8e597889
commit
6342b751f8
1 changed files with 3 additions and 2 deletions
|
|
@ -65,6 +65,7 @@ func die():
|
|||
# strip gears
|
||||
for gear in $Backpack.get_children():
|
||||
gear.queue_free()
|
||||
if has_node("Pivot/Container/Gear"):
|
||||
$Pivot/Container/Gear.unequip(self)
|
||||
$Pivot/Container/Gear.queue_free()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue