Player kill count bug fix.
This commit is contained in:
parent
61b3ede526
commit
bcb634befb
|
@ -205,16 +205,8 @@ static void checkCollisions(Bullet *b)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* assuming that health <= 0 will always mean killed */
|
/* 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;
|
e->killedBy = b->owner;
|
||||||
|
|
||||||
if (b->type == BT_MISSILE && e == player && b->target != player)
|
if (b->type == BT_MISSILE && e == player && b->target != player)
|
||||||
|
|
|
@ -530,6 +530,11 @@ static void die(void)
|
||||||
{
|
{
|
||||||
battle.stats[STAT_EPIC_KILL_STREAK]++;
|
battle.stats[STAT_EPIC_KILL_STREAK]++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (self->side == SIDE_PANDORAN)
|
||||||
|
{
|
||||||
|
awardTrophy("PANDORAN");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,6 +49,7 @@ extern char *getTranslatedString(char *string);
|
||||||
extern int getJSONValue(cJSON *node, char *name, int defValue);
|
extern int getJSONValue(cJSON *node, char *name, int defValue);
|
||||||
extern char **toTypeArray(char *types, int *numTypes);
|
extern char **toTypeArray(char *types, int *numTypes);
|
||||||
extern char *getJSONValueStr(cJSON *node, char *name, char *defValue);
|
extern char *getJSONValueStr(cJSON *node, char *name, char *defValue);
|
||||||
|
extern void awardTrophy(char *id);
|
||||||
|
|
||||||
extern App app;
|
extern App app;
|
||||||
extern Battle battle;
|
extern Battle battle;
|
||||||
|
|
Loading…
Reference in New Issue