From 997d423103fad407315f1b42335689f5c3e7d262 Mon Sep 17 00:00:00 2001 From: Steve Date: Sat, 24 Feb 2018 16:00:20 +0000 Subject: [PATCH] Don't show teleporting or gone entities on the radar. --- src/world/radar.c | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/src/world/radar.c b/src/world/radar.c index cfa040c..353a17c 100644 --- a/src/world/radar.c +++ b/src/world/radar.c @@ -321,23 +321,26 @@ static void drawEntities(void) static int isValidBlip(Entity *e) { - switch (e->type) + if (!(e->flags & (EF_GONE | EF_TELEPORTING))) { - case ET_BOB: - case ET_MIA: - case ET_TEEKA: - return 1; - - case ET_ENEMY: - case ET_BOSS: - case ET_HEART_CELL: - case ET_KEY: - case ET_ITEM: - case ET_DESTRUCTABLE: - return e->isMissionTarget; - - default: - return 0; + switch (e->type) + { + case ET_BOB: + case ET_MIA: + case ET_TEEKA: + return 1; + + case ET_ENEMY: + case ET_BOSS: + case ET_HEART_CELL: + case ET_KEY: + case ET_ITEM: + case ET_DESTRUCTABLE: + return e->isMissionTarget; + + default: + return 0; + } } return 0;