From 49084d0a1efae19eca40b3c2d3cef1356bda5e84 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Mon, 22 Jul 2019 16:20:24 +0800 Subject: [PATCH] 1 --- server/gameserver/human.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/gameserver/human.cc b/server/gameserver/human.cc index 260acee..91164c4 100644 --- a/server/gameserver/human.cc +++ b/server/gameserver/human.cc @@ -225,10 +225,11 @@ void Human::DirectShot(MetaData::Equip* bullet_meta, int skill_id) if (sender) { int skill_id = a8::Low32(param.param2.GetInt64()); int offset_idx = a8::High32(param.param2.GetInt64()); - float attack_x = a8::Low32(param.param2.GetInt64()) / (float)kTEN_W; - float attack_y = a8::High32(param.param2.GetInt64()) / (float)kTEN_W; + float attack_x = a8::Low32(param.param3.GetInt64()) / (float)kTEN_W; + float attack_y = a8::High32(param.param3.GetInt64()) / (float)kTEN_W; a8::Vec2 old_attack_dir = sender->attack_dir; sender->attack_dir = a8::Vec2(attack_x, attack_y); + sender->attack_dir.Normalize(); sender->InternalShot(bullet_meta, skill_id, offset_idx);