From 2158e94a96b64300b290c5a7374e6ae65c4e8040 Mon Sep 17 00:00:00 2001 From: David Cernat Date: Wed, 25 Jan 2017 18:04:20 +0200 Subject: [PATCH] [Client] Fix setting of attack parameters after recent changes --- apps/openmw/mwclass/npc.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/openmw/mwclass/npc.cpp b/apps/openmw/mwclass/npc.cpp index 0f04f6250..95df91abe 100644 --- a/apps/openmw/mwclass/npc.cpp +++ b/apps/openmw/mwclass/npc.cpp @@ -850,11 +850,11 @@ namespace MWClass mwmp::DedicatedPlayer *victimPlayer = mwmp::Players::getPlayer(ptr); if (attacker == MWMechanics::getPlayer() && victimPlayer != nullptr) { - mwmp::Attack attack = mwmp::Main::get().getLocalPlayer()->attack; - attack.damage = damage; - attack.attacker = mwmp::Main::get().getLocalPlayer()->guid; - attack.target = victimPlayer->guid; - attack.knockdown = getCreatureStats(ptr).getKnockedDown(); + mwmp::Attack *attack = &mwmp::Main::get().getLocalPlayer()->attack; + attack->damage = damage; + attack->attacker = mwmp::Main::get().getLocalPlayer()->guid; + attack->target = victimPlayer->guid; + attack->knockdown = getCreatureStats(ptr).getKnockedDown(); mwmp::Main::get().getLocalPlayer()->sendAttack(mwmp::Attack::MELEE); // todo: make this sensitive to different weapon types }