Revenge trophy requires player to kill the enemy that killed them last.
This commit is contained in:
parent
40695a3572
commit
4cd0c36b73
|
@ -310,7 +310,7 @@
|
|||
{
|
||||
"id" : "REVENGE",
|
||||
"title" : "Revenge",
|
||||
"description" : "During an epic battle, kill an enemy that previously killed you",
|
||||
"description" : "During an epic battle, kill the enemy that just killed you",
|
||||
"value" : "TROPHY_BRONZE"
|
||||
}
|
||||
]
|
||||
|
|
|
@ -233,10 +233,10 @@ static void checkCollisions(Bullet *b)
|
|||
|
||||
if (e == player)
|
||||
{
|
||||
b->owner->flags |= EF_KILLED_PLAYER;
|
||||
battle.lastKilledPlayer = b->owner;
|
||||
}
|
||||
|
||||
if (b->owner == player && e->flags & EF_KILLED_PLAYER)
|
||||
if (b->owner == player && e == battle.lastKilledPlayer)
|
||||
{
|
||||
awardTrophy("REVENGE");
|
||||
}
|
||||
|
|
|
@ -109,7 +109,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#define EF_NO_THREAT (2 << 23)
|
||||
#define EF_DROPS_ITEMS (2 << 24)
|
||||
#define EF_COMMON_FIGHTER (2 << 25)
|
||||
#define EF_KILLED_PLAYER (2 << 26)
|
||||
|
||||
#define AIF_NONE 0
|
||||
#define AIF_FOLLOWS_PLAYER (2 << 0)
|
||||
|
|
|
@ -359,6 +359,7 @@ typedef struct {
|
|||
Entity *missionTarget;
|
||||
Entity *jumpgate;
|
||||
Entity *messageSpeaker;
|
||||
Entity *lastKilledPlayer;
|
||||
SDL_Texture *background, *planetTexture;
|
||||
PointF planet;
|
||||
int planetWidth, planetHeight;
|
||||
|
|
Loading…
Reference in New Issue