1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-22 10:53:54 +00:00

Revert "Checks the state of the passed sneak variable"

This reverts commit 4a4c08946c.
This commit is contained in:
Jeffrey Haines 2014-04-26 10:03:56 -04:00
parent 48b2c0073b
commit f0c5d1a7e1

View file

@ -134,8 +134,6 @@ namespace MWWorld
ptr.getClass().getCreatureStats(ptr).setMovementFlag(MWMechanics::CreatureStats::Flag_Sneak, sneak); ptr.getClass().getCreatureStats(ptr).setMovementFlag(MWMechanics::CreatureStats::Flag_Sneak, sneak);
if (sneak == true)
{
const MWWorld::ESMStore& esmStore = MWBase::Environment::get().getWorld()->getStore(); const MWWorld::ESMStore& esmStore = MWBase::Environment::get().getWorld()->getStore();
// Find all the actors who might be able to see the player // Find all the actors who might be able to see the player
@ -143,16 +141,10 @@ namespace MWWorld
MWBase::Environment::get().getMechanicsManager()->getActorsInRange( Ogre::Vector3(ptr.getRefData().getPosition().pos), MWBase::Environment::get().getMechanicsManager()->getActorsInRange( Ogre::Vector3(ptr.getRefData().getPosition().pos),
esmStore.get<ESM::GameSetting>().find("fSneakUseDist")->getInt(), neighbors); esmStore.get<ESM::GameSetting>().find("fSneakUseDist")->getInt(), neighbors);
for (std::vector<MWWorld::Ptr>::iterator it = neighbors.begin(); it != neighbors.end(); ++it) for (std::vector<MWWorld::Ptr>::iterator it = neighbors.begin(); it != neighbors.end(); ++it)
{
if ( MWBase::Environment::get().getMechanicsManager()->awarenessCheck(ptr, *it) ) if ( MWBase::Environment::get().getMechanicsManager()->awarenessCheck(ptr, *it) )
{ MWBase::Environment::get().getWindowManager()->setSneakVisibility(sneak);
MWBase::Environment::get().getWindowManager()->setSneakVisibility(false); if (!neighbors.size())
break; MWBase::Environment::get().getWindowManager()->setSneakVisibility(sneak);
}
}
if (neighbors.size() == 0)
MWBase::Environment::get().getWindowManager()->setSneakVisibility(true);
}
} }
void Player::yaw(float yaw) void Player::yaw(float yaw)