mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-24 03:39:43 +00:00
final warnings removal
This commit is contained in:
parent
7df8273d71
commit
46a4790cb1
2 changed files with 45 additions and 42 deletions
|
@ -26,6 +26,10 @@ namespace
|
|||
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
|
||||
|
@ -256,7 +260,7 @@ namespace MWMechanics
|
|||
//less than in time of playing weapon anim from 'start' to 'hit' tags (t_swing)
|
||||
//then start attacking
|
||||
float speed1 = cls.getSpeed(actor);
|
||||
float speed2 = cls.getSpeed(mTarget);
|
||||
float speed2 = mTarget.getClass().getSpeed(mTarget);
|
||||
if(actor.getClass().getMovementSettings(mTarget).mPosition[0] == 0
|
||||
&& actor.getClass().getMovementSettings(mTarget).mPosition[1] == 0)
|
||||
speed2 = 0;
|
||||
|
@ -357,7 +361,10 @@ namespace MWMechanics
|
|||
{
|
||||
return new AiCombat(*this);
|
||||
}
|
||||
}
|
||||
|
||||
namespace
|
||||
{
|
||||
void determineAttackType(const MWWorld::Ptr& actor, MWMechanics::Movement &movement)
|
||||
{
|
||||
if (movement.mPosition[0] && !movement.mPosition[1]) //sideway
|
||||
|
@ -403,5 +410,5 @@ namespace MWMechanics
|
|||
movement.mPosition[1] = 1;
|
||||
//else chop
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -45,10 +45,6 @@ namespace MWMechanics
|
|||
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue