mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-27 13:11:37 +00:00
Merge branch 'div0' into 'master'
Fix UBSAN warning See merge request OpenMW/openmw!1107
This commit is contained in:
commit
99e30115a9
1 changed files with 1 additions and 1 deletions
|
@ -163,7 +163,7 @@ namespace MWPhysics
|
|||
}
|
||||
|
||||
// Now that we have the effective movement vector, apply wind forces to it
|
||||
if (worldData.mIsInStorm)
|
||||
if (worldData.mIsInStorm && velocity.length() > 0)
|
||||
{
|
||||
osg::Vec3f stormDirection = worldData.mStormDirection;
|
||||
float angleDegrees = osg::RadiansToDegrees(std::acos(stormDirection * velocity / (stormDirection.length() * velocity.length())));
|
||||
|
|
Loading…
Reference in a new issue