1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-06-21 04:11:33 +00:00

final warnings removal

This commit is contained in:
mrcheko 2014-01-17 20:33:49 +02:00
parent 7df8273d71
commit 46a4790cb1
2 changed files with 45 additions and 42 deletions

View file

@ -26,6 +26,10 @@ namespace
return 1.0; return 1.0;
return -1.0; return -1.0;
} }
void determineAttackType(const MWWorld::Ptr& actor, MWMechanics::Movement &movement);
//chooses an attack depending on probability to avoid uniformity
void chooseBestAttack(const ESM::Weapon* weapon, MWMechanics::Movement &movement);
} }
namespace MWMechanics namespace MWMechanics
@ -256,7 +260,7 @@ namespace MWMechanics
//less than in time of playing weapon anim from 'start' to 'hit' tags (t_swing) //less than in time of playing weapon anim from 'start' to 'hit' tags (t_swing)
//then start attacking //then start attacking
float speed1 = cls.getSpeed(actor); float speed1 = cls.getSpeed(actor);
float speed2 = cls.getSpeed(mTarget); float speed2 = mTarget.getClass().getSpeed(mTarget);
if(actor.getClass().getMovementSettings(mTarget).mPosition[0] == 0 if(actor.getClass().getMovementSettings(mTarget).mPosition[0] == 0
&& actor.getClass().getMovementSettings(mTarget).mPosition[1] == 0) && actor.getClass().getMovementSettings(mTarget).mPosition[1] == 0)
speed2 = 0; speed2 = 0;
@ -357,7 +361,10 @@ namespace MWMechanics
{ {
return new AiCombat(*this); return new AiCombat(*this);
} }
}
namespace
{
void determineAttackType(const MWWorld::Ptr& actor, MWMechanics::Movement &movement) void determineAttackType(const MWWorld::Ptr& actor, MWMechanics::Movement &movement)
{ {
if (movement.mPosition[0] && !movement.mPosition[1]) //sideway if (movement.mPosition[0] && !movement.mPosition[1]) //sideway
@ -403,5 +410,5 @@ namespace MWMechanics
movement.mPosition[1] = 1; movement.mPosition[1] = 1;
//else chop //else chop
} }
}
}

View file

@ -45,10 +45,6 @@ namespace MWMechanics
void buildNewPath(const MWWorld::Ptr& actor); void buildNewPath(const MWWorld::Ptr& actor);
}; };
static void determineAttackType(const MWWorld::Ptr& actor, MWMechanics::Movement &movement);
//chooses an attack depending on probability to avoid uniformity
static void chooseBestAttack(const ESM::Weapon* weapon, MWMechanics::Movement &movement);
} }
#endif #endif