Reduce mob range when racing as if the player were sneaking

This commit is contained in:
dongresource 2020-12-28 16:41:29 +01:00
parent fc45775666
commit 9a79ab3927

View File

@ -6,6 +6,7 @@
#include "MissionManager.hpp" #include "MissionManager.hpp"
#include "GroupManager.hpp" #include "GroupManager.hpp"
#include "TransportManager.hpp" #include "TransportManager.hpp"
#include "RacingManager.hpp"
#include <cmath> #include <cmath>
#include <limits.h> #include <limits.h>
@ -1188,7 +1189,8 @@ bool MobManager::aggroCheck(Mob *mob, time_t currTime) {
int mobRange = mob->sightRange; 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; mobRange /= 3;
if (plr->iSpecialState & (CN_SPECIAL_STATE_FLAG__INVISIBLE|CN_SPECIAL_STATE_FLAG__INVULNERABLE)) if (plr->iSpecialState & (CN_SPECIAL_STATE_FLAG__INVISIBLE|CN_SPECIAL_STATE_FLAG__INVULNERABLE))