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:
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())
|
||||
{
|
||||
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));
|
||||
|
|
Loading…
Reference in a new issue