1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-20 19:39:41 +00:00

Fix not being able to move during ashstorm

This commit is contained in:
scrawl 2015-06-05 03:35:59 +02:00
parent 700000cbca
commit 1fd48e6f81

View file

@ -288,7 +288,7 @@ namespace MWPhysics
if (MWBase::Environment::get().getWorld()->isInStorm())
{
osg::Vec3f stormDirection = MWBase::Environment::get().getWorld()->getStormDirection();
float angleDegrees = osg::RadiansToDegrees(std::acos(stormDirection * velocity));
float angleDegrees = osg::RadiansToDegrees(std::acos(stormDirection * velocity / (stormDirection.length() * velocity.length())));
static const float fStromWalkMult = MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>()
.find("fStromWalkMult")->getFloat();
velocity *= 1.f-(fStromWalkMult * (angleDegrees/180.f));