From befea2ac65b9ba5a6ea4c89aee85bdb02aef1b5c Mon Sep 17 00:00:00 2001 From: Steve Date: Sun, 25 Feb 2018 08:36:40 +0000 Subject: [PATCH] Allow entities to mostly go offscreen, but not enough to let the player cut across the level. --- src/world/entities.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/world/entities.c b/src/world/entities.c index 8c7f959..a642b2b 100644 --- a/src/world/entities.c +++ b/src/world/entities.c @@ -435,7 +435,7 @@ static void moveEntity(void) if (!(self->flags & (EF_KILL_OFFSCREEN | EF_NO_CLIP))) { self->x = limit(self->x, world.map.bounds.x, world.map.bounds.w + SCREEN_WIDTH - self->w); - self->y = limit(self->y, world.map.bounds.y, world.map.bounds.h + SCREEN_HEIGHT - self->h); + self->y = limit(self->y, world.map.bounds.y - (self->h - 1), world.map.bounds.h + SCREEN_HEIGHT - self->h); } }