summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeon Krieg <leonkrieg93@gmail.com>2016-12-15 19:29:05 +0100
committerLeon Krieg <leonkrieg93@gmail.com>2016-12-15 19:33:14 +0100
commit12c8c3276a5f39ea4c89e9e171d048fe2b7ce571 (patch)
tree32dbe6d2ff6882df74a1f090ff75f749752094dd
parent81b9b07820aebebe44359aebf553b65d07ec0d3e (diff)
Disable NPC collision only when death animation has finished (#3666)
-rw-r--r--apps/openmw/mwmechanics/actors.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/openmw/mwmechanics/actors.cpp b/apps/openmw/mwmechanics/actors.cpp
index 2a5995e..23a6f49 100644
--- a/apps/openmw/mwmechanics/actors.cpp
+++ b/apps/openmw/mwmechanics/actors.cpp
@@ -1271,8 +1271,6 @@ namespace MWMechanics
stats.getActiveSpells().clear();
calculateCreatureStatModifiers(iter->first, 0);
- MWBase::Environment::get().getWorld()->enableActorCollision(iter->first, false);
-
if (cls.isEssential(iter->first))
MWBase::Environment::get().getWindowManager()->messageBox("#{sKilledEssential}");
}
@@ -1290,6 +1288,11 @@ namespace MWMechanics
//player's death animation is over
MWBase::Environment::get().getStateManager()->askLoadRecent();
}
+ else
+ {
+ // NPC death animation is over, disable actor collision
+ MWBase::Environment::get().getWorld()->enableActorCollision(iter->first, false);
+ }
// Play Death Music if it was the player dying
if(iter->first == getPlayer())