Allow entities to mostly go offscreen, but not enough to let the player cut across the level.

This commit is contained in:
Steve 2018-02-25 08:36:40 +00:00
parent 537f3c42ff
commit befea2ac65
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}
}