From 7281f9fc4222749792c2c3ba12d0968fd2af72b0 Mon Sep 17 00:00:00 2001 From: David Cernat Date: Sun, 16 Sep 2018 15:34:57 +0300 Subject: [PATCH] [Client] Prevent unilateral paralysis of dedicated players & actors This is a temporary workaround until active effect synchronization is implemented. --- apps/openmw/mwmechanics/spellcasting.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/apps/openmw/mwmechanics/spellcasting.cpp b/apps/openmw/mwmechanics/spellcasting.cpp index deb24dbdc..419453555 100644 --- a/apps/openmw/mwmechanics/spellcasting.cpp +++ b/apps/openmw/mwmechanics/spellcasting.cpp @@ -1371,6 +1371,22 @@ namespace MWMechanics case ESM::MagicEffect::RemoveCurse: actor.getClass().getCreatureStats(actor).getSpells().purgeCurses(); break; + /* + Start of tes3mp addition + + Don't apply paralysis to DedicatedPlayers and DedicatedActors unilterally on this client + */ + case ESM::MagicEffect::Paralyze: + { + if (mwmp::PlayerList::isDedicatedPlayer(actor) || mwmp::Main::get().getCellController()->isDedicatedActor(actor)) + { + actor.getClass().getCreatureStats(actor).getActiveSpells().purgeEffect(ESM::MagicEffect::Paralyze); + break; + } + } + /* + End of tes3mp addition + */ default: return false; }