diff --git a/apps/openmw/mwmp/Cell.cpp b/apps/openmw/mwmp/Cell.cpp index 01c86bf28..f8c93f5a8 100644 --- a/apps/openmw/mwmp/Cell.cpp +++ b/apps/openmw/mwmp/Cell.cpp @@ -251,6 +251,20 @@ void Cell::readAttack(ActorList& actorList) { DedicatedActor *actor = dedicatedActors[mapIndex]; actor->attack = baseActor.attack; + + // Set the correct drawState here if we've somehow we've missed a previous + // AnimFlags packet + if (actor->attack.type == mwmp::Attack::MELEE && actor->drawState != 1) + { + actor->drawState = 1; + actor->setAnimFlags(); + } + else if (actor->attack.type == mwmp::Attack::MAGIC && actor->drawState != 2) + { + actor->drawState = 2; + actor->setAnimFlags(); + } + mwmp::Main::get().getMechanicsHelper()->processAttack(actor->attack, actor->getPtr()); } } diff --git a/apps/openmw/mwmp/MechanicsHelper.cpp b/apps/openmw/mwmp/MechanicsHelper.cpp index 4e98d4c7e..3269d7b3d 100644 --- a/apps/openmw/mwmp/MechanicsHelper.cpp +++ b/apps/openmw/mwmp/MechanicsHelper.cpp @@ -173,9 +173,8 @@ void MechanicsHelper::processAttack(Attack attack, const MWWorld::Ptr& attacker) } } - // Get the weapon used (if hand-to-hand, weapon = inv.end()) - if (attackerStats.getDrawState() == MWMechanics::DrawState_Weapon) + if (attack.type == attack.MELEE) { MWWorld::Ptr weapon;