forked from teamnwah/openmw-tes3coop
Reduce scope of variables
This commit is contained in:
parent
c655875584
commit
5a00b239ac
2 changed files with 5 additions and 5 deletions
|
@ -500,7 +500,6 @@ namespace MWMechanics
|
||||||
{
|
{
|
||||||
// get the range of the target's weapon
|
// get the range of the target's weapon
|
||||||
float rangeAttackOfTarget = 0.f;
|
float rangeAttackOfTarget = 0.f;
|
||||||
bool isRangedCombat = false;
|
|
||||||
MWWorld::Ptr targetWeapon = MWWorld::Ptr();
|
MWWorld::Ptr targetWeapon = MWWorld::Ptr();
|
||||||
const MWWorld::Class& targetClass = target.getClass();
|
const MWWorld::Class& targetClass = target.getClass();
|
||||||
|
|
||||||
|
@ -516,7 +515,10 @@ namespace MWMechanics
|
||||||
boost::shared_ptr<Action> targetWeaponAction (new ActionWeapon(targetWeapon));
|
boost::shared_ptr<Action> targetWeaponAction (new ActionWeapon(targetWeapon));
|
||||||
|
|
||||||
if (targetWeaponAction.get())
|
if (targetWeaponAction.get())
|
||||||
|
{
|
||||||
|
bool isRangedCombat = false;
|
||||||
rangeAttackOfTarget = targetWeaponAction->getCombatRange(isRangedCombat);
|
rangeAttackOfTarget = targetWeaponAction->getCombatRange(isRangedCombat);
|
||||||
|
}
|
||||||
|
|
||||||
// apply sideway movement (kind of dodging) with some probability
|
// apply sideway movement (kind of dodging) with some probability
|
||||||
// if actor is within range of target's weapon
|
// if actor is within range of target's weapon
|
||||||
|
|
|
@ -1058,11 +1058,9 @@ namespace MWRender
|
||||||
float timepassed = duration * state.mSpeedMult;
|
float timepassed = duration * state.mSpeedMult;
|
||||||
while(state.mPlaying)
|
while(state.mPlaying)
|
||||||
{
|
{
|
||||||
float targetTime;
|
|
||||||
|
|
||||||
if (!state.shouldLoop())
|
if (!state.shouldLoop())
|
||||||
{
|
{
|
||||||
targetTime = state.getTime() + timepassed;
|
float targetTime = state.getTime() + timepassed;
|
||||||
if(textkey == textkeys.end() || textkey->first > targetTime)
|
if(textkey == textkeys.end() || textkey->first > targetTime)
|
||||||
{
|
{
|
||||||
if(mAccumCtrl && state.mTime == mAnimationTimePtr[0]->getTimePtr())
|
if(mAccumCtrl && state.mTime == mAnimationTimePtr[0]->getTimePtr())
|
||||||
|
|
Loading…
Reference in a new issue