1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-20 22:23:52 +00:00

Player can't detect self

This commit is contained in:
Jeffrey Haines 2014-05-04 08:05:32 -04:00
parent e1e23447f2
commit a469444e53

View file

@ -724,7 +724,8 @@ namespace MWMechanics
void Actors::updateSneak (const MWWorld::Ptr& ptr) void Actors::updateSneak (const MWWorld::Ptr& ptr)
{ {
const MWWorld::Ptr player = MWBase::Environment::get().getWorld()->getPlayerPtr(); const MWWorld::Ptr player = MWBase::Environment::get().getWorld()->getPlayerPtr();
if (player.getClass().getCreatureStats(player).getMovementFlag(MWMechanics::CreatureStats::Flag_Sneak)) if ( player.getClass().getCreatureStats(player).getMovementFlag(MWMechanics::CreatureStats::Flag_Sneak)
&& ptr != player)
{ {
const MWWorld::ESMStore& esmStore = MWBase::Environment::get().getWorld()->getStore(); const MWWorld::ESMStore& esmStore = MWBase::Environment::get().getWorld()->getStore();
int radius = esmStore.get<ESM::GameSetting>().find("fSneakUseDist")->getInt(); int radius = esmStore.get<ESM::GameSetting>().find("fSneakUseDist")->getInt();