Merge remote-tracking branch 'scrawl/master'

This commit is contained in:
Marc Zinnschlag 2014-03-22 09:54:42 +01:00
commit 4d80bc009a
2 changed files with 3 additions and 6 deletions

View file

@ -2,6 +2,7 @@
#include "previewwidget.hpp"
#include <OgreSceneManager.h>
#include <OgreSceneNode.h>
#include "../../model/world/data.hpp"
#include "../../model/world/idtable.hpp"

View file

@ -1245,12 +1245,8 @@ void CharacterController::update(float duration)
else //avoid z-rotating for knockdown
world->rotateObject(mPtr, rot.x, rot.y, 0.0f, true);
// always control actual movement by animation unless this:
// FIXME: actor falling/landing should be controlled by physics engine
if(mMovementAnimVelocity == 0.0f && (vec.length() > 0.0f || mJumpState != JumpState_None))
{
if (mMovementAnimVelocity == 0)
world->queueMovement(mPtr, vec);
}
}
movement = vec;
@ -1290,7 +1286,7 @@ void CharacterController::update(float duration)
}
// Update movement
if(moved.squaredLength() > 1.0f)
if(mMovementAnimVelocity > 0)
world->queueMovement(mPtr, moved);
}
mSkipAnim = false;