From 97bf0252a4ce4d63f07b7cf957af76c3c5da58ee Mon Sep 17 00:00:00 2001 From: David Cernat Date: Wed, 31 May 2017 07:52:45 +0300 Subject: [PATCH] [Client] Disable collision for actors loaded as dead from server --- apps/openmw/mwmp/Cell.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/apps/openmw/mwmp/Cell.cpp b/apps/openmw/mwmp/Cell.cpp index f0eee0816..47c1f435d 100644 --- a/apps/openmw/mwmp/Cell.cpp +++ b/apps/openmw/mwmp/Cell.cpp @@ -1,6 +1,8 @@ #include #include +#include "../mwbase/environment.hpp" + #include "../mwworld/class.hpp" #include "../mwworld/livecellref.hpp" #include "../mwworld/worldimp.hpp" @@ -190,8 +192,13 @@ void Cell::readStatsDynamic(ActorList& actorList) // received from the server still gets set actor->setStatsDynamic(); + // Actors loaded as dead from the server need special handling to skip their death animations + // and disable their collision if (actor->creatureStats.mDynamic[0].mCurrent < 1) + { actor->getPtr().getClass().getCreatureStats(actor->getPtr()).setDeathAnimationFinished(true); + MWBase::Environment::get().getWorld()->enableActorCollision(actor->getPtr(), false); + } } } }