mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-04 21:40:03 +00:00
Don't try to step if not on the ground
This commit is contained in:
parent
5a1a0b7338
commit
c694161272
@ -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…
x
Reference in New Issue
Block a user