From 171c61022d432508e39616d413fd5a677f8c6eff Mon Sep 17 00:00:00 2001 From: Lukasz Gromanowski Date: Mon, 21 Jul 2014 21:16:30 +0200 Subject: [PATCH] Added initialization of weapRange in AiCombat::execute(). Signed-off-by: Lukasz Gromanowski --- apps/openmw/mwmechanics/aicombat.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwmechanics/aicombat.cpp b/apps/openmw/mwmechanics/aicombat.cpp index 2606daa88e..c0a97a1b1f 100644 --- a/apps/openmw/mwmechanics/aicombat.cpp +++ b/apps/openmw/mwmechanics/aicombat.cpp @@ -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;