[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.
0.6.3
David Cernat 7 years ago
parent 53d758ba16
commit 886b3431bc

@ -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);

Loading…
Cancel
Save