Save grenade combo value to correct stat slot.

This commit is contained in:
Steve 2018-04-27 18:22:32 +01:00
parent c4efe60abd
commit cd8ee71c30
1 changed files with 12 additions and 12 deletions

View File

@ -45,18 +45,6 @@ void addExplosion(float x, float y, int radius, Entity *owner)
if (killTimer < SDL_GetTicks()) 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; 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");
}
}
} }