mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-23 06:41:08 +00:00
Merge branch 'combat_aiming' into 'master'
Finish turning before attacking Closes #3488 See merge request OpenMW/openmw!1358
This commit is contained in:
commit
0c11175da1
@ -3,6 +3,7 @@
|
||||
|
||||
Bug #1751: Birthsign abilities increase modified attribute values instead of base ones
|
||||
Bug #3246: ESSImporter: Most NPCs are dead on save load
|
||||
Bug #3488: AI combat aiming is too slow
|
||||
Bug #3514: Editing a reference's position after loading an esp file makes the reference disappear
|
||||
Bug #3737: Scripts from The Underground 2 .esp do not play (all patched versions)
|
||||
Bug #3792: 1 frame late magicka recalc breaks early scripted magicka reactions to Intelligence change
|
||||
|
@ -137,7 +137,10 @@ namespace MWMechanics
|
||||
}
|
||||
|
||||
storage.updateCombatMove(duration);
|
||||
storage.mRotateMove = false;
|
||||
if (storage.mReadyToAttack) updateActorsMovement(actor, duration, storage);
|
||||
if (storage.mRotateMove)
|
||||
return false;
|
||||
storage.updateAttack(characterController);
|
||||
}
|
||||
else
|
||||
@ -442,7 +445,7 @@ namespace MWMechanics
|
||||
storage.mCurrentAction->getCombatRange(isRangedCombat);
|
||||
float eps = isRangedCombat ? osg::DegreesToRadians(0.5) : osg::DegreesToRadians(3.f);
|
||||
float targetAngleRadians = storage.mMovement.mRotation[axis];
|
||||
smoothTurn(actor, targetAngleRadians, axis, eps);
|
||||
storage.mRotateMove = !smoothTurn(actor, targetAngleRadians, axis, eps);
|
||||
}
|
||||
|
||||
MWWorld::Ptr AiCombat::getTarget() const
|
||||
|
@ -33,6 +33,7 @@ namespace MWMechanics
|
||||
bool mAttack;
|
||||
float mAttackRange;
|
||||
bool mCombatMove;
|
||||
bool mRotateMove;
|
||||
osg::Vec3f mLastTargetPos;
|
||||
const MWWorld::CellStore* mCell;
|
||||
std::shared_ptr<Action> mCurrentAction;
|
||||
@ -65,6 +66,7 @@ namespace MWMechanics
|
||||
mAttack(false),
|
||||
mAttackRange(0.0f),
|
||||
mCombatMove(false),
|
||||
mRotateMove(false),
|
||||
mLastTargetPos(0,0,0),
|
||||
mCell(nullptr),
|
||||
mCurrentAction(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user