1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-15 19:19:55 +00:00

[Client] Make PlayerResurrect use new resurrection handling from 6450d84473

This commit is contained in:
David Cernat 2019-10-26 09:12:06 +03:00
parent a74bf1baec
commit c9f3ee1819
2 changed files with 5 additions and 2 deletions

View file

@ -828,7 +828,7 @@ void LocalPlayer::resurrect()
else if (resurrectType == mwmp::RESURRECT_TYPE::TRIBUNAL_TEMPLE)
MWBase::Environment::get().getWorld()->teleportToClosestMarker(ptrPlayer, "templemarker");
ptrPlayer.getClass().getCreatureStats(ptrPlayer).resurrect();
MWBase::Environment::get().getMechanicsManager()->resurrect(ptrPlayer);
// The player could have died from a hand-to-hand attack, so reset their fatigue
// as well

View file

@ -2,6 +2,9 @@
#define OPENMW_PROCESSORPLAYERRESURRECT_HPP
#include "../PlayerProcessor.hpp"
#include "apps/openmw/mwmechanics/mechanicsmanagerimp.hpp"
#include "apps/openmw/mwmp/Main.hpp"
#include "apps/openmw/mwmp/Networking.hpp"
@ -36,7 +39,7 @@ namespace mwmp
MWWorld::Ptr ptr = static_cast<DedicatedPlayer*>(player)->getPtr();
ptr.getClass().getCreatureStats(ptr).resurrect();
MWBase::Environment::get().getMechanicsManager()->resurrect(ptr);
MWMechanics::DynamicStat<float> health;
health.readState(player->creatureStats.mDynamic[0]);