forked from teamnwah/openmw-tes3coop
Remove attacktype movement
This commit is contained in:
parent
154dcc942c
commit
286e4bb98f
1 changed files with 0 additions and 20 deletions
|
@ -687,22 +687,12 @@ std::string chooseBestAttack(const ESM::Weapon* weapon, MWMechanics::Movement &m
|
||||||
//hand-to-hand deal equal damage for each type
|
//hand-to-hand deal equal damage for each type
|
||||||
float roll = Misc::Rng::rollClosedProbability();
|
float roll = Misc::Rng::rollClosedProbability();
|
||||||
if(roll <= 0.333f) //side punch
|
if(roll <= 0.333f) //side punch
|
||||||
{
|
|
||||||
movement.mPosition[0] = (Misc::Rng::rollClosedProbability() < 0.5f) ? 1.0f : -1.0f;
|
|
||||||
movement.mPosition[1] = 0;
|
|
||||||
attackType = "slash";
|
attackType = "slash";
|
||||||
}
|
|
||||||
else if(roll <= 0.666f) //forward punch
|
else if(roll <= 0.666f) //forward punch
|
||||||
{
|
|
||||||
movement.mPosition[1] = 1;
|
|
||||||
attackType = "thrust";
|
attackType = "thrust";
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
movement.mPosition[1] = movement.mPosition[0] = 0;
|
|
||||||
attackType = "chop";
|
attackType = "chop";
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//the more damage attackType deals the more probability it has
|
//the more damage attackType deals the more probability it has
|
||||||
|
@ -712,22 +702,12 @@ std::string chooseBestAttack(const ESM::Weapon* weapon, MWMechanics::Movement &m
|
||||||
|
|
||||||
float roll = Misc::Rng::rollClosedProbability() * (slash + chop + thrust);
|
float roll = Misc::Rng::rollClosedProbability() * (slash + chop + thrust);
|
||||||
if(roll <= slash)
|
if(roll <= slash)
|
||||||
{
|
|
||||||
movement.mPosition[0] = (Misc::Rng::rollClosedProbability() < 0.5f) ? 1.0f : -1.0f;
|
|
||||||
movement.mPosition[1] = 0;
|
|
||||||
attackType = "slash";
|
attackType = "slash";
|
||||||
}
|
|
||||||
else if(roll <= (slash + thrust))
|
else if(roll <= (slash + thrust))
|
||||||
{
|
|
||||||
movement.mPosition[1] = 1;
|
|
||||||
attackType = "thrust";
|
attackType = "thrust";
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
movement.mPosition[1] = movement.mPosition[0] = 0;
|
|
||||||
attackType = "chop";
|
attackType = "chop";
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return attackType;
|
return attackType;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue