forked from teamnwah/openmw-tes3coop
Use mRange to check spell range instead of mArea.
This commit is contained in:
parent
9fdfb2a83f
commit
87939bf3b1
1 changed files with 3 additions and 3 deletions
|
@ -889,7 +889,7 @@ namespace MWMechanics
|
||||||
for (std::vector<ESM::ENAMstruct>::const_iterator effectIt =
|
for (std::vector<ESM::ENAMstruct>::const_iterator effectIt =
|
||||||
spell->mEffects.mList.begin(); effectIt != spell->mEffects.mList.end(); ++effectIt)
|
spell->mEffects.mList.begin(); effectIt != spell->mEffects.mList.end(); ++effectIt)
|
||||||
{
|
{
|
||||||
if (effectIt->mArea == ESM::RT_Target)
|
if (effectIt->mRange == ESM::RT_Target)
|
||||||
{
|
{
|
||||||
const ESM::MagicEffect* effect = MWBase::Environment::get().getWorld()->getStore().get<ESM::MagicEffect>().find(effectIt->mEffectID);
|
const ESM::MagicEffect* effect = MWBase::Environment::get().getWorld()->getStore().get<ESM::MagicEffect>().find(effectIt->mEffectID);
|
||||||
dist = effect->mData.mSpeed;
|
dist = effect->mData.mSpeed;
|
||||||
|
@ -906,7 +906,7 @@ namespace MWMechanics
|
||||||
for (std::vector<ESM::ENAMstruct>::const_iterator effectIt =
|
for (std::vector<ESM::ENAMstruct>::const_iterator effectIt =
|
||||||
ench->mEffects.mList.begin(); effectIt != ench->mEffects.mList.end(); ++effectIt)
|
ench->mEffects.mList.begin(); effectIt != ench->mEffects.mList.end(); ++effectIt)
|
||||||
{
|
{
|
||||||
if (effectIt->mArea == ESM::RT_Target)
|
if (effectIt->mRange == ESM::RT_Target)
|
||||||
{
|
{
|
||||||
const ESM::MagicEffect* effect = MWBase::Environment::get().getWorld()->getStore().get<ESM::MagicEffect>().find(effectIt->mEffectID);
|
const ESM::MagicEffect* effect = MWBase::Environment::get().getWorld()->getStore().get<ESM::MagicEffect>().find(effectIt->mEffectID);
|
||||||
dist = effect->mData.mSpeed;
|
dist = effect->mData.mSpeed;
|
||||||
|
@ -1029,7 +1029,7 @@ namespace MWMechanics
|
||||||
for (std::vector<ESM::ENAMstruct>::const_iterator effectIt =
|
for (std::vector<ESM::ENAMstruct>::const_iterator effectIt =
|
||||||
spell->mEffects.mList.begin(); effectIt != spell->mEffects.mList.end(); ++effectIt)
|
spell->mEffects.mList.begin(); effectIt != spell->mEffects.mList.end(); ++effectIt)
|
||||||
{
|
{
|
||||||
if (effectIt->mArea == ESM::RT_Target)
|
if (effectIt->mRange == ESM::RT_Target)
|
||||||
{
|
{
|
||||||
if (!MWBase::Environment::get().getWorld()->isSwimming(enemy))
|
if (!MWBase::Environment::get().getWorld()->isSwimming(enemy))
|
||||||
mult = fAIRangeMagicSpellMult;
|
mult = fAIRangeMagicSpellMult;
|
||||||
|
|
Loading…
Reference in a new issue