Updated battle area restrictions, to fit quadtree changes.

This commit is contained in:
Steve 2016-02-21 08:54:14 +00:00
parent 1e24844d9b
commit f402c8e7b9
2 changed files with 6 additions and 6 deletions

View File

@ -31,7 +31,7 @@ static void doEntity(void);
static void alignComponents(void); static void alignComponents(void);
static void drawEntity(Entity *e); static void drawEntity(Entity *e);
static void activateEpicFighters(int n, int side); static void activateEpicFighters(int n, int side);
static void restrictToGrid(Entity *e); static void restrictToBattleArea(Entity *e);
static void drawTargetRects(Entity *e); static void drawTargetRects(Entity *e);
static int drawComparator(const void *a, const void *b); static int drawComparator(const void *a, const void *b);
static void notifyNewArrivals(void); static void notifyNewArrivals(void);
@ -155,7 +155,7 @@ void doEntities(void)
doRope(e); doRope(e);
restrictToGrid(e); restrictToBattleArea(e);
if (!e->speed) if (!e->speed)
{ {
@ -254,7 +254,7 @@ void doEntities(void)
} }
} }
static void restrictToGrid(Entity *e) static void restrictToBattleArea(Entity *e)
{ {
float force; float force;

View File

@ -101,21 +101,21 @@ void drawRadarRangeWarning(void)
leaving = 1; leaving = 1;
} }
if (y <= 2 && player->dy < 0) if (y <= 3 && player->dy < 0)
{ {
blitRotated(radarWarningTexture, SCREEN_WIDTH - 85, SCREEN_HEIGHT - 85, 0); blitRotated(radarWarningTexture, SCREEN_WIDTH - 85, SCREEN_HEIGHT - 85, 0);
leaving = 1; leaving = 1;
} }
if (x >= (SCREEN_WIDTH / 2) - 2 && player->dx > 0) if (x >= BATTLE_AREA_CELLS - 2 && player->dx > 0)
{ {
blitRotated(radarWarningTexture, SCREEN_WIDTH - 85, SCREEN_HEIGHT - 85, 90); blitRotated(radarWarningTexture, SCREEN_WIDTH - 85, SCREEN_HEIGHT - 85, 90);
leaving = 1; leaving = 1;
} }
if (y >= (SCREEN_HEIGHT / 2) - 2 && player->dy > 0) if (y >= BATTLE_AREA_CELLS - 3 && player->dy > 0)
{ {
blitRotated(radarWarningTexture, SCREEN_WIDTH - 85, SCREEN_HEIGHT - 85, 180); blitRotated(radarWarningTexture, SCREEN_WIDTH - 85, SCREEN_HEIGHT - 85, 180);