mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-21 00:39:58 +00:00
Merge branch 'div0' into 'master'
Fix UBSAN warning See merge request OpenMW/openmw!1107
This commit is contained in:
commit
99e30115a9
@ -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…
x
Reference in New Issue
Block a user