1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-31 17:15:34 +00:00

Merge branch 'actor_souls_only' into 'master'

Check if the target is an actor before updating magic effects

Closes #6339

See merge request OpenMW/openmw!1294
This commit is contained in:
psi29a 2021-10-14 15:19:16 +00:00
commit 787da4891c

View file

@ -49,7 +49,8 @@ namespace MWMechanics
cast.mHitPosition = hitPosition;
cast.cast(object, false);
// Apply magic effects directly instead of waiting a frame to allow soul trap to work on one-hit kills
MWBase::Environment::get().getMechanicsManager()->updateMagicEffects(victim);
if(victim.getClass().isActor())
MWBase::Environment::get().getMechanicsManager()->updateMagicEffects(victim);
return true;
}
}