mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-03 12:49:40 +00:00
Make the maximum horizontal stepping distance independent of movement speed (Fixes #1638)
This commit is contained in:
parent
e2346d7c37
commit
18fb3f831a
1 changed files with 4 additions and 1 deletions
|
@ -428,7 +428,10 @@ namespace MWWorld
|
||||||
Ogre::Vector3 oldPosition = newPosition;
|
Ogre::Vector3 oldPosition = newPosition;
|
||||||
// We hit something. Try to step up onto it. (NOTE: stepMove does not allow stepping over)
|
// We hit something. Try to step up onto it. (NOTE: stepMove does not allow stepping over)
|
||||||
// NOTE: stepMove modifies newPosition if successful
|
// NOTE: stepMove modifies newPosition if successful
|
||||||
if(stepMove(colobj, newPosition, velocity, remainingTime, engine))
|
bool result = stepMove(colobj, newPosition, velocity, remainingTime, engine);
|
||||||
|
if (!result)
|
||||||
|
result = stepMove(colobj, newPosition, velocity.normalisedCopy()*300.f, remainingTime, engine);
|
||||||
|
if(result)
|
||||||
{
|
{
|
||||||
// don't let pure water creatures move out of water after stepMove
|
// don't let pure water creatures move out of water after stepMove
|
||||||
if((ptr.getClass().canSwim(ptr) && !ptr.getClass().canWalk(ptr))
|
if((ptr.getClass().canSwim(ptr) && !ptr.getClass().canWalk(ptr))
|
||||||
|
|
Loading…
Reference in a new issue