mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-11 21:36:40 -04:00
Revise storm wind effect on velocity (bug #8206)
This commit is contained in:
parent
891bb67ac5
commit
a239724316
@ -198,6 +198,7 @@
|
|||||||
Bug #8172: Openmw-cs crashes when viewing `Dantooine, Sea`
|
Bug #8172: Openmw-cs crashes when viewing `Dantooine, Sea`
|
||||||
Bug #8187: Intervention effects should use Chebyshev distance to determine the closest marker
|
Bug #8187: Intervention effects should use Chebyshev distance to determine the closest marker
|
||||||
Bug #8191: NiRollController does not work for sheath meshes
|
Bug #8191: NiRollController does not work for sheath meshes
|
||||||
|
Bug #8206: Moving away from storm wind origin should make you faster
|
||||||
Bug #8207: Using hand-to-hand while sneaking plays the critical hit sound when the target is not getting hurt
|
Bug #8207: Using hand-to-hand while sneaking plays the critical hit sound when the target is not getting hurt
|
||||||
Feature #1415: Infinite fall failsafe
|
Feature #1415: Infinite fall failsafe
|
||||||
Feature #2566: Handle NAM9 records for manual cell references
|
Feature #2566: Handle NAM9 records for manual cell references
|
||||||
|
@ -178,15 +178,10 @@ namespace MWPhysics
|
|||||||
// Now that we have the effective movement vector, apply wind forces to it
|
// Now that we have the effective movement vector, apply wind forces to it
|
||||||
if (worldData.mIsInStorm && velocity.length() > 0)
|
if (worldData.mIsInStorm && velocity.length() > 0)
|
||||||
{
|
{
|
||||||
osg::Vec3f stormDirection = worldData.mStormDirection;
|
const MWWorld::ESMStore& store = *MWBase::Environment::get().getESMStore();
|
||||||
float angleDegrees = osg::RadiansToDegrees(
|
const float fStromWalkMult = store.get<ESM::GameSetting>().find("fStromWalkMult")->mValue.getFloat();
|
||||||
std::acos(stormDirection * velocity / (stormDirection.length() * velocity.length())));
|
const float angleCos = worldData.mStormDirection * velocity / velocity.length();
|
||||||
static const float fStromWalkMult = MWBase::Environment::get()
|
velocity *= 1.f + fStromWalkMult * angleCos;
|
||||||
.getESMStore()
|
|
||||||
->get<ESM::GameSetting>()
|
|
||||||
.find("fStromWalkMult")
|
|
||||||
->mValue.getFloat();
|
|
||||||
velocity *= 1.f - (fStromWalkMult * (angleDegrees / 180.f));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Stepper stepper(collisionWorld, actor.mCollisionObject);
|
Stepper stepper(collisionWorld, actor.mCollisionObject);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user