Movement controller: Don't allow stepping up other actors

This seems to fix issues with NPCs inadvertently being placed on top of a small creature while fighting it.
Note that jumping on top of actors is still possible (Bug #1192)
This commit is contained in:
scrawl 2014-12-16 20:44:42 +01:00
parent 0dc9401269
commit b9e5aa9db6

View file

@ -195,6 +195,9 @@ namespace MWWorld
stepper.doTrace(colobj, tracer.mEndPos, tracer.mEndPos-Ogre::Vector3(0.0f,0.0f,sStepSize), engine);
if(stepper.mFraction < 1.0f && getSlope(stepper.mPlaneNormal) <= sMaxSlope)
{
// don't allow stepping up other actors
if (stepper.mHitObject->getBroadphaseHandle()->m_collisionFilterGroup == OEngine::Physic::CollisionType_Actor)
return false;
// only step down onto semi-horizontal surfaces. don't step down onto the side of a house or a wall.
// TODO: stepper.mPlaneNormal does not appear to be reliable - needs more testing
// NOTE: caller's variables 'position' & 'remainingTime' are modified here