mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-29 16:11:37 -04:00
[Client] Ensure correct drawState when receiving an ActorAttack packet
This commit is contained in:
parent
bf2b3bbf51
commit
7c87ac80ee
@ -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());
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user