From 08ae2c926edf4696bea11e0256ac3e0200b5ad6a Mon Sep 17 00:00:00 2001 From: Latapostrophe Date: Thu, 24 Oct 2019 21:00:58 +0200 Subject: [PATCH] Accidentally removed a bit of code I shouldn't have removed --- src/p_enemy.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/p_enemy.c b/src/p_enemy.c index f64acbfd6..65a66fdb5 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -8771,6 +8771,13 @@ void A_SPBChase(mobj_t *actor) bestwaypoint, player->nextwaypoint, useshortcuts, huntbackwards); } + if (nextwaypoint == NULL && lastwaypoint != NULL) + { + // Restore to the last nextwaypoint + nextwaypoint = lastwaypoint; + } + + if (nextwaypoint != NULL) { const fixed_t xywaypointdist = P_AproxDistance(