mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-27 09:41:16 +00:00
Merge branch 'fix-sneaking-with-followers' into 'master'
Do not run sneaking awarness checks for actors siding with player (#6133) Closes #6133 See merge request OpenMW/openmw!678
This commit is contained in:
commit
e582d5ecaa
@ -9,6 +9,7 @@
|
|||||||
Bug #6066: addtopic "return" does not work from within script. No errors thrown
|
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 #6101: Disarming trapped unlocked owned objects isn't considered a crime
|
||||||
Bug #6115: Showmap overzealous matching
|
Bug #6115: Showmap overzealous matching
|
||||||
|
Bug #6133: Cannot reliably sneak or steal in the sight of the NPCs siding with player
|
||||||
|
|
||||||
0.47.0
|
0.47.0
|
||||||
------
|
------
|
||||||
|
@ -2396,11 +2396,17 @@ namespace MWMechanics
|
|||||||
float radius = std::min(fSneakUseDist, mActorsProcessingRange);
|
float radius = std::min(fSneakUseDist, mActorsProcessingRange);
|
||||||
getObjectsInRange(position, radius, observers);
|
getObjectsInRange(position, radius, observers);
|
||||||
|
|
||||||
|
std::set<MWWorld::Ptr> sidingActors;
|
||||||
|
getActorsSidingWith(player, sidingActors);
|
||||||
|
|
||||||
for (const MWWorld::Ptr &observer : observers)
|
for (const MWWorld::Ptr &observer : observers)
|
||||||
{
|
{
|
||||||
if (observer == player || observer.getClass().getCreatureStats(observer).isDead())
|
if (observer == player || observer.getClass().getCreatureStats(observer).isDead())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (sidingActors.find(observer) != sidingActors.cend())
|
||||||
|
continue;
|
||||||
|
|
||||||
if (world->getLOS(player, observer))
|
if (world->getLOS(player, observer))
|
||||||
{
|
{
|
||||||
if (MWBase::Environment::get().getMechanicsManager()->awarenessCheck(player, observer))
|
if (MWBase::Environment::get().getMechanicsManager()->awarenessCheck(player, observer))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user