From 8ce2273acb81bd4e5266b513f3628032bbfc10bc Mon Sep 17 00:00:00 2001 From: davidovski Date: Tue, 23 Apr 2024 21:33:38 +0100 Subject: make exit not movable again afterwards --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'main.go') diff --git a/main.go b/main.go index 84ea5b8..848f2f1 100644 --- a/main.go +++ b/main.go @@ -426,7 +426,7 @@ func (g *Game) UpdatePlacing() { for i := len(g.objects)-1; i >= 0; i-- { obj := g.objects[i] obj.Update(*g.tilemap, g.objects) - if obj.y > screenHeight { + if obj.y > screenHeight && obj != g.player{ g.toPlace = append(g.toPlace, obj) g.RemoveObject(obj) } -- cgit v1.2.1