Player can't detect self

openmw-30
Jeffrey Haines 11 years ago
parent e1e23447f2
commit a469444e53

@ -724,7 +724,8 @@ namespace MWMechanics
void Actors::updateSneak (const MWWorld::Ptr& ptr)
{
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();
int radius = esmStore.get<ESM::GameSetting>().find("fSneakUseDist")->getInt();

Loading…
Cancel
Save