forked from mirror/openmw-tes3mp
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:
parent
0dc9401269
commit
b9e5aa9db6
1 changed files with 3 additions and 0 deletions
|
@ -195,6 +195,9 @@ namespace MWWorld
|
||||||
stepper.doTrace(colobj, tracer.mEndPos, tracer.mEndPos-Ogre::Vector3(0.0f,0.0f,sStepSize), engine);
|
stepper.doTrace(colobj, tracer.mEndPos, tracer.mEndPos-Ogre::Vector3(0.0f,0.0f,sStepSize), engine);
|
||||||
if(stepper.mFraction < 1.0f && getSlope(stepper.mPlaneNormal) <= sMaxSlope)
|
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.
|
// 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
|
// TODO: stepper.mPlaneNormal does not appear to be reliable - needs more testing
|
||||||
// NOTE: caller's variables 'position' & 'remainingTime' are modified here
|
// NOTE: caller's variables 'position' & 'remainingTime' are modified here
|
||||||
|
|
Loading…
Reference in a new issue