From aab5b69c8097e272a77ac1bbdfdbc8679f38fbec Mon Sep 17 00:00:00 2001 From: David Cernat Date: Fri, 24 Feb 2017 11:50:43 +0200 Subject: [PATCH] [Client] Unready weapon & spell upon death to avoid attack inability bug --- apps/openmw/mwmp/Networking.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/openmw/mwmp/Networking.cpp b/apps/openmw/mwmp/Networking.cpp index 0d1b99fa3..fce91e000 100644 --- a/apps/openmw/mwmp/Networking.cpp +++ b/apps/openmw/mwmp/Networking.cpp @@ -486,6 +486,11 @@ void Networking::processPlayerPacket(RakNet::Packet *packet) 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 + // 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()->cell = *player.getCell()->getCell(); myPacket->Send(getLocalPlayer(), serverAddr);