From 886b3431bc51d7a94fa51494663caa4a6917b296 Mon Sep 17 00:00:00 2001 From: David Cernat Date: Tue, 13 Feb 2018 21:54:46 +0200 Subject: [PATCH] [Client] When resurrecting players, set pcknownwerewolf to 0 This makes it so players are no longer known werewolves and are no longer attacked infinitely by guards. --- apps/openmw/mwmp/LocalPlayer.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwmp/LocalPlayer.cpp b/apps/openmw/mwmp/LocalPlayer.cpp index 4265b5c57..03e370d4f 100644 --- a/apps/openmw/mwmp/LocalPlayer.cpp +++ b/apps/openmw/mwmp/LocalPlayer.cpp @@ -816,9 +816,11 @@ void LocalPlayer::resurrect() // Record that the player has died since the last attempt was made to arrest them, // used to make guards lenient enough to attempt an arrest again diedSinceArrestAttempt = true; - LOG_APPEND(Log::LOG_INFO, "- diedSinceArrestAttempt is now true"); + // Record that we are no longer a known werewolf, to avoid being attacked infinitely + MWBase::Environment::get().getWorld()->setGlobalInt("pcknownwerewolf", 0); + // Ensure we unequip any items with constant effects that can put us into an infinite // death loop MechanicsHelper::unequipItemsByEffect(ptrPlayer, ESM::Enchantment::ConstantEffect, ESM::MagicEffect::DrainHealth);