mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-28 23:51:09 -04:00
[Client] Make PlayerResurrect use new resurrection handling from 6450d84473300d98a7aaa4f90abc9a3e77106c52
This commit is contained in:
parent
a74bf1baec
commit
c9f3ee1819
@ -828,7 +828,7 @@ void LocalPlayer::resurrect()
|
|||||||
else if (resurrectType == mwmp::RESURRECT_TYPE::TRIBUNAL_TEMPLE)
|
else if (resurrectType == mwmp::RESURRECT_TYPE::TRIBUNAL_TEMPLE)
|
||||||
MWBase::Environment::get().getWorld()->teleportToClosestMarker(ptrPlayer, "templemarker");
|
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
|
// The player could have died from a hand-to-hand attack, so reset their fatigue
|
||||||
// as well
|
// as well
|
||||||
|
@ -2,6 +2,9 @@
|
|||||||
#define OPENMW_PROCESSORPLAYERRESURRECT_HPP
|
#define OPENMW_PROCESSORPLAYERRESURRECT_HPP
|
||||||
|
|
||||||
#include "../PlayerProcessor.hpp"
|
#include "../PlayerProcessor.hpp"
|
||||||
|
|
||||||
|
#include "apps/openmw/mwmechanics/mechanicsmanagerimp.hpp"
|
||||||
|
|
||||||
#include "apps/openmw/mwmp/Main.hpp"
|
#include "apps/openmw/mwmp/Main.hpp"
|
||||||
#include "apps/openmw/mwmp/Networking.hpp"
|
#include "apps/openmw/mwmp/Networking.hpp"
|
||||||
|
|
||||||
@ -36,7 +39,7 @@ namespace mwmp
|
|||||||
|
|
||||||
MWWorld::Ptr ptr = static_cast<DedicatedPlayer*>(player)->getPtr();
|
MWWorld::Ptr ptr = static_cast<DedicatedPlayer*>(player)->getPtr();
|
||||||
|
|
||||||
ptr.getClass().getCreatureStats(ptr).resurrect();
|
MWBase::Environment::get().getMechanicsManager()->resurrect(ptr);
|
||||||
|
|
||||||
MWMechanics::DynamicStat<float> health;
|
MWMechanics::DynamicStat<float> health;
|
||||||
health.readState(player->creatureStats.mDynamic[0]);
|
health.readState(player->creatureStats.mDynamic[0]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user