Added Bodyguard trophy.

This commit is contained in:
Steve 2016-04-27 12:52:45 +01:00
parent a2c95cb100
commit 603d2ed7a0
2 changed files with 16 additions and 3 deletions

View File

@ -144,6 +144,12 @@
"description" : "Be killed by a missile that was meant for someone else",
"value" : "TROPHY_SILVER"
},
{
"id" : "BODYGUARD",
"title" : "The bodyguard",
"description" : "Kill an enemy with a missile intended for another",
"value" : "TROPHY_BRONZE"
},
{
"id" : "_CHALLENGE_25",
"title" : "",
@ -246,7 +252,7 @@
{
"id" : "EPIC_KILL_13",
"title" : "Yippie-ki-yay",
"description" : "Destroy 13 or more enemies in an epic battle without being killed",
"description" : "Destroy 13 or more enemies in an epic battle, without being killed",
"value" : "TROPHY_SILVER",
"stat" : "STAT_EPIC_KILL_STREAK",
"statValue" : 13

View File

@ -212,9 +212,16 @@ static void checkCollisions(Bullet *b)
{
e->killedBy = b->owner;
if (b->type == BT_MISSILE && e == player && b->target != player)
if (b->type == BT_MISSILE && b->target != e)
{
awardTrophy("TEAM_PLAYER");
if (e == player)
{
awardTrophy("TEAM_PLAYER");
}
else if (b->owner == player)
{
awardTrophy("BODYGUARD");
}
}
}