1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-15 18:39:51 +00:00

Make the maximum horizontal stepping distance independent of movement speed (Fixes #1638)

This commit is contained in:
scrawl 2014-12-30 15:46:33 +01:00
parent e2346d7c37
commit 18fb3f831a

View File

@ -428,7 +428,10 @@ namespace MWWorld
Ogre::Vector3 oldPosition = newPosition;
// We hit something. Try to step up onto it. (NOTE: stepMove does not allow stepping over)
// 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
if((ptr.getClass().canSwim(ptr) && !ptr.getClass().canWalk(ptr))