Remove attacktype movement

pull/55/head
Allofich 8 years ago
parent 154dcc942c
commit 286e4bb98f

@ -687,21 +687,11 @@ std::string chooseBestAttack(const ESM::Weapon* weapon, MWMechanics::Movement &m
//hand-to-hand deal equal damage for each type
float roll = Misc::Rng::rollClosedProbability();
if(roll <= 0.333f) //side punch
{
movement.mPosition[0] = (Misc::Rng::rollClosedProbability() < 0.5f) ? 1.0f : -1.0f;
movement.mPosition[1] = 0;
attackType = "slash";
}
else if(roll <= 0.666f) //forward punch
{
movement.mPosition[1] = 1;
attackType = "thrust";
}
else
{
movement.mPosition[1] = movement.mPosition[0] = 0;
attackType = "chop";
}
}
else
{
@ -712,21 +702,11 @@ std::string chooseBestAttack(const ESM::Weapon* weapon, MWMechanics::Movement &m
float roll = Misc::Rng::rollClosedProbability() * (slash + chop + thrust);
if(roll <= slash)
{
movement.mPosition[0] = (Misc::Rng::rollClosedProbability() < 0.5f) ? 1.0f : -1.0f;
movement.mPosition[1] = 0;
attackType = "slash";
}
else if(roll <= (slash + thrust))
{
movement.mPosition[1] = 1;
attackType = "thrust";
}
else
{
movement.mPosition[1] = movement.mPosition[0] = 0;
attackType = "chop";
}
}
return attackType;

Loading…
Cancel
Save