player: add check before unequipping gear
This commit is contained in:
parent
f22364ce39
commit
1e4aeddbb5
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