Ignore actors siding with player in awarness check to allow training the sneaking or knowing whether player is detected by other actors in the siding actor line of sight

dont-compose-content
NeveHanter 3 years ago
parent 8bdce3ebef
commit 6bb030aa55

@ -9,6 +9,7 @@
Bug #6066: addtopic "return" does not work from within script. No errors thrown
Bug #6101: Disarming trapped unlocked owned objects isn't considered a crime
Bug #6115: Showmap overzealous matching
Bug #6133: Cannot reliably sneak or steal in the sight of the NPCs siding with player
0.47.0
------

@ -2396,11 +2396,17 @@ namespace MWMechanics
float radius = std::min(fSneakUseDist, mActorsProcessingRange);
getObjectsInRange(position, radius, observers);
std::set<MWWorld::Ptr> sidingActors;
getActorsSidingWith(player, sidingActors);
for (const MWWorld::Ptr &observer : observers)
{
if (observer == player || observer.getClass().getCreatureStats(observer).isDead())
continue;
if (sidingActors.find(observer) != sidingActors.cend())
continue;
if (world->getLOS(player, observer))
{
if (MWBase::Environment::get().getMechanicsManager()->awarenessCheck(player, observer))

Loading…
Cancel
Save