From 18fb3f831a8a9003458dd7e44633ed38d64cce59 Mon Sep 17 00:00:00 2001 From: scrawl Date: Tue, 30 Dec 2014 15:46:33 +0100 Subject: [PATCH] Make the maximum horizontal stepping distance independent of movement speed (Fixes #1638) --- apps/openmw/mwworld/physicssystem.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwworld/physicssystem.cpp b/apps/openmw/mwworld/physicssystem.cpp index af1191ad9..1374dc37a 100644 --- a/apps/openmw/mwworld/physicssystem.cpp +++ b/apps/openmw/mwworld/physicssystem.cpp @@ -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))