From ea951eef78bce86365a503ad83f4c49a2a2e0e40 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Sun, 5 May 2019 21:16:44 +0100 Subject: [PATCH] fix an inconsistency I introduced between counting the waypoints and finding them again --- src/p_enemy.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/p_enemy.c b/src/p_enemy.c index c983a0dc3..adc0f88f0 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -12042,12 +12042,15 @@ void A_Boss5FindWaypoint(mobj_t *actor) { if (avoidcenter) continue; - waypoints[numwaypoints++] = mapthings[i].mobj; } else if (mapthings[i].mobj->reactiontime > 0) + { mapthings[i].mobj->reactiontime--; - else if (P_CheckSight(actor, mapthings[i].mobj)) - waypoints[numwaypoints++] = mapthings[i].mobj; + continue; + } + if (!P_CheckSight(actor, mapthings[i].mobj)) + continue; + waypoints[numwaypoints++] = mapthings[i].mobj; } if (actor->extravalue2 > 1)