mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-10 12:59:58 -04:00
Move early out to better place
This commit is contained in:
parent
09ed5bb234
commit
2db36c49b5
@ -124,6 +124,13 @@ namespace MWMechanics
|
|||||||
if (actor == target) // This should never happen.
|
if (actor == target) // This should never happen.
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
// No actions for totally static creatures
|
||||||
|
if (!actor.getClass().isMobile(actor))
|
||||||
|
{
|
||||||
|
storage.mFleeState = AiCombatStorage::FleeState_Idle;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (!storage.isFleeing())
|
if (!storage.isFleeing())
|
||||||
{
|
{
|
||||||
if (storage.mCurrentAction.get()) // need to wait to init action with its attack range
|
if (storage.mCurrentAction.get()) // need to wait to init action with its attack range
|
||||||
@ -231,10 +238,6 @@ namespace MWMechanics
|
|||||||
storage.stopFleeing();
|
storage.stopFleeing();
|
||||||
}
|
}
|
||||||
|
|
||||||
// No attack actions for totally static creatures
|
|
||||||
if (!actor.getClass().isMobile(actor))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
bool isRangedCombat = false;
|
bool isRangedCombat = false;
|
||||||
float& rangeAttack = storage.mAttackRange;
|
float& rangeAttack = storage.mAttackRange;
|
||||||
|
|
||||||
|
@ -135,10 +135,6 @@ bool MWMechanics::AiPackage::pathTo(const MWWorld::Ptr& actor, const osg::Vec3f&
|
|||||||
MWWorld::MovementDirectionFlags supportedMovementDirections, float destTolerance, float endTolerance,
|
MWWorld::MovementDirectionFlags supportedMovementDirections, float destTolerance, float endTolerance,
|
||||||
PathType pathType)
|
PathType pathType)
|
||||||
{
|
{
|
||||||
// No pathing for totally static creatures
|
|
||||||
if (!actor.getClass().isMobile(actor))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
const Misc::TimerStatus timerStatus = mReaction.update(duration);
|
const Misc::TimerStatus timerStatus = mReaction.update(duration);
|
||||||
|
|
||||||
const osg::Vec3f position = actor.getRefData().getPosition().asVec3(); // position of the actor
|
const osg::Vec3f position = actor.getRefData().getPosition().asVec3(); // position of the actor
|
||||||
|
Loading…
x
Reference in New Issue
Block a user