remove empty guests

This commit is contained in:
mightypanders 2021-06-13 16:39:57 +02:00
parent 79dbae2221
commit 6b115b5325
1 changed files with 3 additions and 0 deletions

View File

@ -125,6 +125,9 @@ func _on_PickupCheckArea_area_entered(area):
func _physics_process(delta): func _physics_process(delta):
for g in guests:
if g == null:
guests.remove(g)
var direction = Vector2.UP.rotated(rotation).normalized() #Playerrotation nehmen ist sicherer var direction = Vector2.UP.rotated(rotation).normalized() #Playerrotation nehmen ist sicherer
var forward_backward = Input.get_action_strength("ui_up") - Input.get_action_strength("ui_down") var forward_backward = Input.get_action_strength("ui_up") - Input.get_action_strength("ui_down")