forked from mirror/openmw-tes3mp
[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.
This commit is contained in:
parent
53d758ba16
commit
886b3431bc
1 changed files with 3 additions and 1 deletions
|
@ -816,9 +816,11 @@ void LocalPlayer::resurrect()
|
||||||
// Record that the player has died since the last attempt was made to arrest them,
|
// 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
|
// used to make guards lenient enough to attempt an arrest again
|
||||||
diedSinceArrestAttempt = true;
|
diedSinceArrestAttempt = true;
|
||||||
|
|
||||||
LOG_APPEND(Log::LOG_INFO, "- diedSinceArrestAttempt is now 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
|
// Ensure we unequip any items with constant effects that can put us into an infinite
|
||||||
// death loop
|
// death loop
|
||||||
MechanicsHelper::unequipItemsByEffect(ptrPlayer, ESM::Enchantment::ConstantEffect, ESM::MagicEffect::DrainHealth);
|
MechanicsHelper::unequipItemsByEffect(ptrPlayer, ESM::Enchantment::ConstantEffect, ESM::MagicEffect::DrainHealth);
|
||||||
|
|
Loading…
Reference in a new issue