mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-20 06:53:52 +00:00
Do not try to launch magic bolt when direction to target is empty (bug #5350)
This commit is contained in:
parent
bb7c2ac630
commit
7545256d1f
2 changed files with 7 additions and 0 deletions
|
@ -211,6 +211,7 @@
|
||||||
Bug #5326: Formatting issues in the settings.cfg
|
Bug #5326: Formatting issues in the settings.cfg
|
||||||
Bug #5328: Skills aren't properly reset for dead actors
|
Bug #5328: Skills aren't properly reset for dead actors
|
||||||
Bug #5345: Dopey Necromancy does not work due to a missing quote
|
Bug #5345: Dopey Necromancy does not work due to a missing quote
|
||||||
|
Bug #5350: An attempt to launch magic bolt causes "AL error invalid value" error
|
||||||
Bug #5352: Light source items' duration is decremented while they aren't visible
|
Bug #5352: Light source items' duration is decremented while they aren't visible
|
||||||
Feature #1774: Handle AvoidNode
|
Feature #1774: Handle AvoidNode
|
||||||
Feature #2229: Improve pathfinding AI
|
Feature #2229: Improve pathfinding AI
|
||||||
|
|
|
@ -291,6 +291,12 @@ namespace MWWorld
|
||||||
if (state.mEffects.mList.empty())
|
if (state.mEffects.mList.empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (!caster.getClass().isActor() && fallbackDirection.length2() <= 0)
|
||||||
|
{
|
||||||
|
Log(Debug::Warning) << "Unable to launch magic bolt (direction to target is empty)";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
MWWorld::ManualRef ref(MWBase::Environment::get().getWorld()->getStore(), state.mIdMagic.at(0));
|
MWWorld::ManualRef ref(MWBase::Environment::get().getWorld()->getStore(), state.mIdMagic.at(0));
|
||||||
MWWorld::Ptr ptr = ref.getPtr();
|
MWWorld::Ptr ptr = ref.getPtr();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue