1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-21 07:53:53 +00:00

Don't apply spells to dead actors

This commit is contained in:
scrawl 2013-11-17 04:32:56 +01:00
parent b8f5cd6cb7
commit 07251f0fa4

View file

@ -2166,7 +2166,10 @@ namespace MWWorld
if (!contact.first.isEmpty()) if (!contact.first.isEmpty())
{ {
if (contact.first.getClass().isActor()) if (contact.first.getClass().isActor())
contact.first.getClass().getCreatureStats(contact.first).getActiveSpells().addSpell(selectedSpell, contact.first, actor, ESM::RT_Touch, sourceName); {
if (!contact.first.getClass().getCreatureStats(contact.first).isDead())
contact.first.getClass().getCreatureStats(contact.first).getActiveSpells().addSpell(selectedSpell, contact.first, actor, ESM::RT_Touch, sourceName);
}
else else
{ {
// We hit a non-actor, e.g. a door. Only instant effects are relevant. // We hit a non-actor, e.g. a door. Only instant effects are relevant.