1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-03-03 13:19:40 +00:00

Fix magic hit VFX showing when casting on a static object

This commit is contained in:
scrawl 2015-06-30 02:52:09 +02:00
parent 4b2391c60f
commit ca21e9ecb1

View file

@ -2653,6 +2653,10 @@ namespace MWWorld
target = result.mHitObject; target = result.mHitObject;
hitPosition = result.mHitPos; hitPosition = result.mHitPos;
// don't allow casting on non-activatable objects
if (!target.isEmpty() && !target.getClass().isActor() && target.getClass().getName(target).empty())
target = MWWorld::Ptr();
std::string selectedSpell = stats.getSpells().getSelectedSpell(); std::string selectedSpell = stats.getSpells().getSelectedSpell();
MWMechanics::CastSpell cast(actor, target); MWMechanics::CastSpell cast(actor, target);