mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-04 07:19:43 +00:00
[Client] Let scripts handle respawn point instead of hardcoding it
This commit is contained in:
parent
db8218545f
commit
6887930c04
1 changed files with 0 additions and 5 deletions
|
@ -483,16 +483,11 @@ void Networking::processPlayerPacket(RakNet::Packet *packet)
|
||||||
{
|
{
|
||||||
MWWorld::Ptr player = MWBase::Environment::get().getWorld()->getPlayerPtr();
|
MWWorld::Ptr player = MWBase::Environment::get().getWorld()->getPlayerPtr();
|
||||||
player.getClass().getCreatureStats(player).resurrect();
|
player.getClass().getCreatureStats(player).resurrect();
|
||||||
ESM::Position resurrectPos;
|
|
||||||
MWBase::Environment::get().getWorld()->findInteriorPosition("Pelagiad, Fort Pelagiad", resurrectPos);
|
|
||||||
MWBase::Environment::get().getWorld()->changeToInteriorCell("Pelagiad, Fort Pelagiad", resurrectPos, true);
|
|
||||||
|
|
||||||
// If this player had a weapon or spell readied when dying, they will
|
// If this player had a weapon or spell readied when dying, they will
|
||||||
// still have it readied but be unable to use it unless we clear it here
|
// still have it readied but be unable to use it unless we clear it here
|
||||||
player.getClass().getNpcStats(player).setDrawState(MWMechanics::DrawState_Nothing);
|
player.getClass().getNpcStats(player).setDrawState(MWMechanics::DrawState_Nothing);
|
||||||
|
|
||||||
getLocalPlayer()->position = resurrectPos;
|
|
||||||
getLocalPlayer()->cell = *player.getCell()->getCell();
|
|
||||||
myPacket->Send(getLocalPlayer(), serverAddr);
|
myPacket->Send(getLocalPlayer(), serverAddr);
|
||||||
|
|
||||||
getLocalPlayer()->updateDynamicStats(true);
|
getLocalPlayer()->updateDynamicStats(true);
|
||||||
|
|
Loading…
Reference in a new issue