From ec6e57194ed79ad32c24d49bcceab2c202eeb882 Mon Sep 17 00:00:00 2001 From: Steve Date: Wed, 11 Nov 2015 21:55:04 +0000 Subject: [PATCH] Extraction point is registered with battle. --- src/battle/extractionPoint.c | 3 ++- src/battle/extractionPoint.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/battle/extractionPoint.c b/src/battle/extractionPoint.c index f772a35..7d301c0 100644 --- a/src/battle/extractionPoint.c +++ b/src/battle/extractionPoint.c @@ -30,7 +30,6 @@ Entity *spawnExtractionPoint(void) extractionPoint->type = ET_EXTRACTION_POINT; extractionPoint->health = extractionPoint->maxHealth = FPS; extractionPoint->texture = getTexture("gfx/entities/extractionPoint.png"); - extractionPoint->flags = EF_MISSION_TARGET; extractionPoint->action = think; extractionPoint->flags |= EF_NO_MT_BOX; @@ -48,6 +47,8 @@ static void think(void) } handleFleeingEntities(); + + battle.extractionPoint = self; } static void handleFleeingEntities(void) diff --git a/src/battle/extractionPoint.h b/src/battle/extractionPoint.h index 8577052..b24b9dd 100644 --- a/src/battle/extractionPoint.h +++ b/src/battle/extractionPoint.h @@ -28,4 +28,5 @@ extern Entity *spawnEntity(void); extern Entity **getAllEntsWithin(int x, int y, int w, int h, Entity *ignore); extern int getDistance(int x1, int y1, int x2, int y2); +extern Battle battle; extern Entity *self;