mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-13 07:06:43 +00:00
Don't try to step if not on the ground
This commit is contained in:
parent
5a1a0b7338
commit
c694161272
1 changed files with 2 additions and 1 deletions
|
@ -156,7 +156,8 @@ namespace MWWorld
|
||||||
//std::cout<<"angle: "<<getSlope(trace.planenormal)<<"\n";
|
//std::cout<<"angle: "<<getSlope(trace.planenormal)<<"\n";
|
||||||
if(getSlope(currentNormal) > sMaxSlope || currentNormal == lastNormal)
|
if(getSlope(currentNormal) > sMaxSlope || currentNormal == lastNormal)
|
||||||
{
|
{
|
||||||
if(!stepMove(newPosition, velocity, remainingTime, verticalRotation, halfExtents, isInterior, engine))
|
if(!onground ||
|
||||||
|
!stepMove(newPosition, velocity, remainingTime, verticalRotation, halfExtents, isInterior, engine))
|
||||||
{
|
{
|
||||||
Ogre::Vector3 resultantDirection = currentNormal.crossProduct(up);
|
Ogre::Vector3 resultantDirection = currentNormal.crossProduct(up);
|
||||||
resultantDirection.normalise();
|
resultantDirection.normalise();
|
||||||
|
|
Loading…
Reference in a new issue