mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 22:23:51 +00:00
Merge branch 'fix_give_way' into 'master'
Use full speed in the "NPCs give way" maneuver. See merge request OpenMW/openmw!348
This commit is contained in:
commit
4966cd217e
1 changed files with 2 additions and 4 deletions
|
@ -1804,11 +1804,9 @@ namespace MWMechanics
|
|||
osg::Vec2f newMovement = origMovement + movementCorrection;
|
||||
// Step to the side rather than backward. Otherwise player will be able to push the NPC far away from it's original location.
|
||||
newMovement.y() = std::max(newMovement.y(), 0.f);
|
||||
newMovement.normalize();
|
||||
if (isMoving)
|
||||
{ // Keep the original speed.
|
||||
newMovement.normalize();
|
||||
newMovement *= origMovement.length();
|
||||
}
|
||||
newMovement *= origMovement.length(); // Keep the original speed.
|
||||
movement.mPosition[0] = newMovement.x();
|
||||
movement.mPosition[1] = newMovement.y();
|
||||
if (shouldTurnToApproachingActor)
|
||||
|
|
Loading…
Reference in a new issue