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
|
||||
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
|
||||
{
|
||||
//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);
|
||||
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…
Reference in a new issue