mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 19:19:56 +00:00
[Client] Unready weapon & spell upon death to avoid attack inability bug
This commit is contained in:
parent
a94d1ed296
commit
aab5b69c80
1 changed files with 5 additions and 0 deletions
|
@ -486,6 +486,11 @@ void Networking::processPlayerPacket(RakNet::Packet *packet)
|
||||||
ESM::Position resurrectPos;
|
ESM::Position resurrectPos;
|
||||||
MWBase::Environment::get().getWorld()->findInteriorPosition("Pelagiad, Fort Pelagiad", resurrectPos);
|
MWBase::Environment::get().getWorld()->findInteriorPosition("Pelagiad, Fort Pelagiad", resurrectPos);
|
||||||
MWBase::Environment::get().getWorld()->changeToInteriorCell("Pelagiad, Fort Pelagiad", resurrectPos, true);
|
MWBase::Environment::get().getWorld()->changeToInteriorCell("Pelagiad, Fort Pelagiad", resurrectPos, true);
|
||||||
|
|
||||||
|
// 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
|
||||||
|
player.getClass().getNpcStats(player).setDrawState(MWMechanics::DrawState_Nothing);
|
||||||
|
|
||||||
getLocalPlayer()->position = resurrectPos;
|
getLocalPlayer()->position = resurrectPos;
|
||||||
getLocalPlayer()->cell = *player.getCell()->getCell();
|
getLocalPlayer()->cell = *player.getCell()->getCell();
|
||||||
myPacket->Send(getLocalPlayer(), serverAddr);
|
myPacket->Send(getLocalPlayer(), serverAddr);
|
||||||
|
|
Loading…
Reference in a new issue