forked from mirror/openmw-tes3mp
Fix not being able to move during ashstorm
This commit is contained in:
parent
700000cbca
commit
1fd48e6f81
1 changed files with 1 additions and 1 deletions
|
@ -288,7 +288,7 @@ namespace MWPhysics
|
||||||
if (MWBase::Environment::get().getWorld()->isInStorm())
|
if (MWBase::Environment::get().getWorld()->isInStorm())
|
||||||
{
|
{
|
||||||
osg::Vec3f stormDirection = MWBase::Environment::get().getWorld()->getStormDirection();
|
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>()
|
static const float fStromWalkMult = MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>()
|
||||||
.find("fStromWalkMult")->getFloat();
|
.find("fStromWalkMult")->getFloat();
|
||||||
velocity *= 1.f-(fStromWalkMult * (angleDegrees/180.f));
|
velocity *= 1.f-(fStromWalkMult * (angleDegrees/180.f));
|
||||||
|
|
Loading…
Reference in a new issue