From d35e2899d921f0d7f8b1bc203e16f9462e5d974d Mon Sep 17 00:00:00 2001 From: Daegaladh Date: Wed, 24 Jun 2020 02:52:22 +0200 Subject: [PATCH] Fixed passive slave monsters becoming aggressive (Passive slave monsters officially get stuck when are too far from their master and lost their target) *Follow up to 04ba3e3d96887ca766fee7ae0e62e5252313ce22 --- src/map/mob.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/map/mob.cpp b/src/map/mob.cpp index b375a46c0f..a29f6c4ae3 100644 --- a/src/map/mob.cpp +++ b/src/map/mob.cpp @@ -1821,7 +1821,7 @@ static bool mob_ai_sub_hard(struct mob_data *md, t_tick tick) map_foreachinshootrange (mob_ai_sub_hard_lootsearch, &md->bl, view_range, BL_ITEM, md, &tbl); } - if ((!tbl && mode&MD_AGGRESSIVE) || md->state.skillstate == MSS_FOLLOW || slave_lost_target) + if ((mode&MD_AGGRESSIVE && (!tbl || slave_lost_target)) || md->state.skillstate == MSS_FOLLOW) { map_foreachinallrange (mob_ai_sub_hard_activesearch, &md->bl, view_range, DEFAULT_ENEMY_TYPE(md), md, &tbl, mode); }