summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorscrawl <scrawl@baseoftrash.de>2016-12-15 22:45:49 +0100
committerGitHub <noreply@github.com>2016-12-15 22:45:49 +0100
commitf97be48bf40c3fa887792fe82e57d27f496fb11f (patch)
treecbaf65a878f176a6c197c086ea65ddf01eb8f7ff
parentc0faeea938e9132cb548c9783004e85cf2c44a87 (diff)
parent12c8c3276a5f39ea4c89e9e171d048fe2b7ce571 (diff)
Merge pull request #1162 from lkrieg/death_collision_fix
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())