From cd8ee71c30c303351666aa9f9362c8e73caba197 Mon Sep 17 00:00:00 2001 From: Steve Date: Fri, 27 Apr 2018 18:22:32 +0100 Subject: [PATCH] Save grenade combo value to correct stat slot. --- src/combat/explosions.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/combat/explosions.c b/src/combat/explosions.c index 33f1d17..24b4105 100644 --- a/src/combat/explosions.c +++ b/src/combat/explosions.c @@ -45,18 +45,6 @@ void addExplosion(float x, float y, int radius, Entity *owner) if (killTimer < SDL_GetTicks()) { - if (numKilled >= 2) - { - setGameplayMessage(MSG_STANDARD, "%d hit grenade combo!", numKilled); - - game.stats[STAT_EYE_DROID_EXPLOSION_KILLS] = MAX(game.stats[STAT_EYE_DROID_EXPLOSION_KILLS], numKilled); - } - - if (numKilled >= 12) - { - awardTrophy("GRENADE_COMBO"); - } - numKilled = 0; } @@ -110,4 +98,16 @@ void addExplosion(float x, float y, int radius, Entity *owner) } } } + + if (numKilled >= 2) + { + setGameplayMessage(MSG_STANDARD, "%d hit grenade combo!", numKilled); + + game.stats[STAT_GRENADE_COMBO] = MAX(game.stats[STAT_GRENADE_COMBO], numKilled); + + if (numKilled >= 12) + { + awardTrophy("GRENADE_COMBO"); + } + } }