summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2024-04-23 21:33:38 +0100
committerdavidovski <david@davidovski.xyz>2024-04-23 21:33:38 +0100
commit8ce2273acb81bd4e5266b513f3628032bbfc10bc (patch)
tree1b43935463076e3d811cf8bf58c7785b8590a228 /main.go
parent00768a53e20410f245d3230d551e3fd7193ed2e6 (diff)
make exit not movable again afterwards
Diffstat (limited to 'main.go')
-rw-r--r--main.go2
1 files changed, 1 insertions, 1 deletions
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)
}