From 427848db9aeaab16d17ed558d138ccd76c333339 Mon Sep 17 00:00:00 2001 From: Steve Date: Fri, 16 Feb 2018 08:41:02 +0000 Subject: [PATCH] Target marker fixes. --- src/world/entities.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/src/world/entities.c b/src/world/entities.c index 46e0fb2..ba80eb9 100644 --- a/src/world/entities.c +++ b/src/world/entities.c @@ -229,11 +229,11 @@ void doEntities(void) self->die(); } } - - if (!(self->flags & (EF_TELEPORTING | EF_GONE))) - { - addToQuadtree(self, &world.quadtree); - } + } + + if (!(self->flags & (EF_TELEPORTING | EF_GONE))) + { + addToQuadtree(self, &world.quadtree); } prev = self; @@ -287,18 +287,14 @@ void drawEntities(int plane) if (self->type == ET_ENEMY && ((Unit*)self)->carriedItem != NULL) { - y -= (targetMarker[0].y + 5); - - blitRect(atlasTexture->texture, x, y, &targetMarker[0].sprite->frames[0]->rect, 0); + blitRect(atlasTexture->texture, x, y - (targetMarker[0].y + 5), &targetMarker[0].sprite->frames[0]->rect, 0); } if (self->isMissionTarget) { t = getMarkerType(); - y -= (targetMarker[t].y + 5); - - blitRect(atlasTexture->texture, x, y, &targetMarker[t].sprite->frames[t]->rect, 0); + blitRect(atlasTexture->texture, x, y - (targetMarker[t].y + 5), &targetMarker[t].sprite->frames[t]->rect, 0); } } }