mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-14 10:21:09 +00:00
Fix not being able to move during ashstorm
This commit is contained in:
parent
700000cbca
commit
1fd48e6f81
@ -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…
x
Reference in New Issue
Block a user