Player kill count bug fix.

This commit is contained in:
Steve 2016-04-10 09:35:30 +01:00
parent 61b3ede526
commit bcb634befb
3 changed files with 7 additions and 9 deletions

View File

@ -205,16 +205,8 @@ static void checkCollisions(Bullet *b)
}
/* assuming that health <= 0 will always mean killed */
if (e->health <= 0 && b->owner == player && (!(e->flags & EF_NO_KILL_INC)))
if (e->health <= 0)
{
battle.stats[STAT_ENEMIES_KILLED_PLAYER]++;
battle.stats[STAT_EPIC_KILL_STREAK]++;
if (e->side == SIDE_PANDORAN)
{
awardTrophy("PANDORAN");
}
e->killedBy = b->owner;
if (b->type == BT_MISSILE && e == player && b->target != player)

View File

@ -530,6 +530,11 @@ static void die(void)
{
battle.stats[STAT_EPIC_KILL_STREAK]++;
}
if (self->side == SIDE_PANDORAN)
{
awardTrophy("PANDORAN");
}
}
}

View File

@ -49,6 +49,7 @@ extern char *getTranslatedString(char *string);
extern int getJSONValue(cJSON *node, char *name, int defValue);
extern char **toTypeArray(char *types, int *numTypes);
extern char *getJSONValueStr(cJSON *node, char *name, char *defValue);
extern void awardTrophy(char *id);
extern App app;
extern Battle battle;