1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-21 18:09:39 +00:00

Get hand-to-hand attack victim's stats if there actually is a victim

This commit is contained in:
David Cernat 2016-08-23 01:23:09 +03:00
parent c4f49e05e3
commit ce5553cda6

View file

@ -334,6 +334,8 @@ void Networking::ReceiveMessage(RakNet::Packet *packet)
if (!weapon.isEmpty() && weapon.getTypeName() != typeid(ESM::Weapon).name())
weapon = MWWorld::Ptr();
if (victim.mRef != 0)
{
bool healthdmg;
if (!weapon.isEmpty())
healthdmg = true;
@ -343,8 +345,6 @@ void Networking::ReceiveMessage(RakNet::Packet *packet)
healthdmg = otherstats.isParalyzed() || otherstats.getKnockedDown();
}
if (victim.mRef != 0)
{
if (!weapon.isEmpty())
MWMechanics::blockMeleeAttack(attacker, victim, weapon, pl->GetAttack()->damage, 1);
pl->getPtr().getClass().onHit(victim, pl->GetAttack()->damage, healthdmg, weapon, attacker,