1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-09 21:42:13 +00:00

Added initialization of weapRange in AiCombat::execute().

Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
This commit is contained in:
Lukasz Gromanowski 2014-07-21 21:16:30 +02:00
parent 1a1f5dfc4a
commit 171c61022d

View File

@ -265,7 +265,7 @@ namespace MWMechanics
const ESM::Weapon *weapon = NULL;
MWMechanics::WeaponType weaptype;
float weapRange;
float weapRange = 1.0f;
actorClass.getCreatureStats(actor).setMovementFlag(CreatureStats::Flag_Run, true);
@ -300,7 +300,7 @@ namespace MWMechanics
else //is creature
{
weaptype = WeapType_HandToHand; //doesn't matter, should only reflect if it is melee or distant weapon
weapRange = 150; //TODO: use true attack range (the same problem in Creature::hit)
weapRange = 150.0f; //TODO: use true attack range (the same problem in Creature::hit)
}
float rangeAttack;