From 561f427c13eff4f68eef3b10b20ccd8e110a8198 Mon Sep 17 00:00:00 2001 From: Steve Date: Wed, 13 Apr 2016 11:04:47 +0100 Subject: [PATCH] Engine effect bug fix. --- src/game/title.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/game/title.c b/src/game/title.c index c9ebb99..2cc2a11 100644 --- a/src/game/title.c +++ b/src/game/title.c @@ -139,18 +139,21 @@ static void doFighters(void) for (i = 0 ; i < NUM_FIGHTERS ; i++) { - fighters[i].y += fighters[i].dy; - self = &fighters[i]; - - addEngineEffect(); - if (fighters[i].y <= -64) + /* engine position hack, due to camera being fixed */ + self->y += 16; + addEngineEffect(); + self->y -= 16; + + self->y += self->dy; + + if (self->y <= -64) { - fighters[i].x = rand() % (SCREEN_WIDTH - 32); - fighters[i].y = SCREEN_HEIGHT + (rand() % SCREEN_HEIGHT); - fighters[i].texture = getTexture(fighterTextures[rand() % numTextures]); - fighters[i].dy = -(1 + rand() % 3); + self->x = rand() % (SCREEN_WIDTH - 32); + self->y = SCREEN_HEIGHT + (rand() % SCREEN_HEIGHT); + self->texture = getTexture(fighterTextures[rand() % numTextures]); + self->dy = -(1 + rand() % 3); } } }