From 9a79ab3927b2f513dcee5f1bd8e770f25a0ce1eb Mon Sep 17 00:00:00 2001 From: dongresource Date: Mon, 28 Dec 2020 16:41:29 +0100 Subject: [PATCH] Reduce mob range when racing as if the player were sneaking --- src/MobManager.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/MobManager.cpp b/src/MobManager.cpp index abaaea2..ca2e31e 100644 --- a/src/MobManager.cpp +++ b/src/MobManager.cpp @@ -6,6 +6,7 @@ #include "MissionManager.hpp" #include "GroupManager.hpp" #include "TransportManager.hpp" +#include "RacingManager.hpp" #include #include @@ -1188,7 +1189,8 @@ bool MobManager::aggroCheck(Mob *mob, time_t currTime) { int mobRange = mob->sightRange; - if (plr->iConditionBitFlag & CSB_BIT_UP_STEALTH) + if (plr->iConditionBitFlag & CSB_BIT_UP_STEALTH + || RacingManager::EPRaces.find(s) != RacingManager::EPRaces.end()) mobRange /= 3; if (plr->iSpecialState & (CN_SPECIAL_STATE_FLAG__INVISIBLE|CN_SPECIAL_STATE_FLAG__INVULNERABLE))