player: add check before unequipping gear
This commit is contained in:
parent
73fe669f57
commit
cda93d8177
1 changed files with 3 additions and 2 deletions
|
|
@ -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")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue