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", "description" : "Be killed by a missile that was meant for someone else",
"value" : "TROPHY_SILVER" "value" : "TROPHY_SILVER"
}, },
{
"id" : "BODYGUARD",
"title" : "The bodyguard",
"description" : "Kill an enemy with a missile intended for another",
"value" : "TROPHY_BRONZE"
},
{ {
"id" : "_CHALLENGE_25", "id" : "_CHALLENGE_25",
"title" : "", "title" : "",
@ -246,7 +252,7 @@
{ {
"id" : "EPIC_KILL_13", "id" : "EPIC_KILL_13",
"title" : "Yippie-ki-yay", "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", "value" : "TROPHY_SILVER",
"stat" : "STAT_EPIC_KILL_STREAK", "stat" : "STAT_EPIC_KILL_STREAK",
"statValue" : 13 "statValue" : 13

View File

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