forked from mirror/openmw-tes3mp
Removed unneeded temp variables.
Corrected case of function names.
This commit is contained in:
parent
50ddcd1953
commit
038851420d
2 changed files with 8 additions and 12 deletions
|
@ -199,13 +199,9 @@ namespace MWMechanics
|
|||
|
||||
//Update every frame
|
||||
storage.updateCombatMove(duration);
|
||||
MWMechanics::Movement& movement = storage.mMovement;
|
||||
|
||||
UpdateActorsMovement(actor, movement);
|
||||
updateActorsMovement(actor, storage.mMovement);
|
||||
storage.updateAttack(characterController);
|
||||
|
||||
float& actionCooldown = storage.mActionCooldown;
|
||||
actionCooldown -= duration;
|
||||
storage.mActionCooldown -= duration;
|
||||
|
||||
float& timerReact = storage.mTimerReact;
|
||||
if(timerReact < REACTION_INTERVAL)
|
||||
|
@ -503,7 +499,7 @@ namespace MWMechanics
|
|||
return false;
|
||||
}
|
||||
|
||||
void AiCombat::UpdateActorsMovement(const MWWorld::Ptr& actor, MWMechanics::Movement& desiredMovement)
|
||||
void AiCombat::updateActorsMovement(const MWWorld::Ptr& actor, MWMechanics::Movement& desiredMovement)
|
||||
{
|
||||
MWMechanics::Movement& actorMovementSettings = actor.getClass().getMovementSettings(actor);
|
||||
if (mPathFinder.isPathConstructed())
|
||||
|
@ -522,12 +518,12 @@ namespace MWMechanics
|
|||
else
|
||||
{
|
||||
actorMovementSettings = desiredMovement;
|
||||
RotateActorOnAxis(actor, 2, actorMovementSettings, desiredMovement);
|
||||
RotateActorOnAxis(actor, 0, actorMovementSettings, desiredMovement);
|
||||
rotateActorOnAxis(actor, 2, actorMovementSettings, desiredMovement);
|
||||
rotateActorOnAxis(actor, 0, actorMovementSettings, desiredMovement);
|
||||
}
|
||||
}
|
||||
|
||||
void AiCombat::RotateActorOnAxis(const MWWorld::Ptr& actor, int axis,
|
||||
void AiCombat::rotateActorOnAxis(const MWWorld::Ptr& actor, int axis,
|
||||
MWMechanics::Movement& actorMovementSettings, MWMechanics::Movement& desiredMovement)
|
||||
{
|
||||
actorMovementSettings.mRotation[axis] = 0;
|
||||
|
|
|
@ -65,8 +65,8 @@ namespace MWMechanics
|
|||
AiCombatStorage& storage, MWWorld::Ptr target);
|
||||
|
||||
/// Transfer desired movement (from AiCombatStorage) to Actor
|
||||
void UpdateActorsMovement(const MWWorld::Ptr& actor, MWMechanics::Movement& movement);
|
||||
void RotateActorOnAxis(const MWWorld::Ptr& actor, int axis,
|
||||
void updateActorsMovement(const MWWorld::Ptr& actor, MWMechanics::Movement& movement);
|
||||
void rotateActorOnAxis(const MWWorld::Ptr& actor, int axis,
|
||||
MWMechanics::Movement& actorMovementSettings, MWMechanics::Movement& desiredMovement);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue