mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-03 16:49:54 +00:00
Removed some duplicated operations.
This commit is contained in:
parent
fcf9ae42f4
commit
aba7225817
1 changed files with 4 additions and 5 deletions
|
@ -181,13 +181,15 @@ namespace MWMechanics
|
||||||
// get or create temporary storage
|
// get or create temporary storage
|
||||||
AiCombatStorage& storage = state.get<AiCombatStorage>();
|
AiCombatStorage& storage = state.get<AiCombatStorage>();
|
||||||
|
|
||||||
|
const MWWorld::Class& actorClass = actor.getClass();
|
||||||
|
|
||||||
|
|
||||||
//General description
|
//General description
|
||||||
if(actor.getClass().getCreatureStats(actor).isDead())
|
if (actorClass.getCreatureStats(actor).isDead())
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
MWWorld::Ptr target = MWBase::Environment::get().getWorld()->searchPtrViaActorId(mTargetActorId);
|
MWBase::World* world = MWBase::Environment::get().getWorld();
|
||||||
|
MWWorld::Ptr target = world->searchPtrViaActorId(mTargetActorId);
|
||||||
if (target.isEmpty())
|
if (target.isEmpty())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -196,9 +198,6 @@ namespace MWMechanics
|
||||||
|| target.getClass().getCreatureStats(target).isDead())
|
|| target.getClass().getCreatureStats(target).isDead())
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
const MWWorld::Class& actorClass = actor.getClass();
|
|
||||||
MWBase::World* world = MWBase::Environment::get().getWorld();
|
|
||||||
|
|
||||||
|
|
||||||
//Update every frame
|
//Update every frame
|
||||||
bool& combatMove = storage.mCombatMove;
|
bool& combatMove = storage.mCombatMove;
|
||||||
|
|
Loading…
Reference in a new issue