Explorar o código

Fix group error

An error in the logs showed that a liner was removed from the living
group several times.
DricomDragon %!s(int64=5) %!d(string=hai) anos
pai
achega
6608324232
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      Player.gd

+ 2 - 1
Player.gd

@@ -151,8 +151,9 @@ func has_block_on(left_or_right:int):
 	return grid.get_cell(bposx, bposy) == 1
 
 func die():
+	if alive:
+		remove_from_group("living")
 	alive = false
-	remove_from_group("living")
 
 func spring():
 	alive = true