From 6e55160aec141274ccabfb2494b5e6ab27a8d286 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Thu, 6 May 2021 17:22:17 +0800 Subject: [PATCH] 1 --- server/gameserver/creature.cc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/server/gameserver/creature.cc b/server/gameserver/creature.cc index 83c375c..63161b4 100644 --- a/server/gameserver/creature.cc +++ b/server/gameserver/creature.cc @@ -45,7 +45,7 @@ void InternalShot(Creature* c, c->room->frame_event.AddShot(c); } for (auto& tuple : weapon_meta->bullet_born_offset) { - a8::Vec2 bullet_born_offset = a8::Vec2(std::get<0>(tuple), std::get<1>(tuple)); + a8::Vec2 bullet_born_offset = c->shoot_offset + a8::Vec2(std::get<0>(tuple), std::get<1>(tuple)); bullet_born_offset.Rotate(c->attack_dir.CalcAngle(a8::Vec2::UP)); a8::Vec2 bullet_born_pos = c->GetPos() + bullet_born_offset; a8::Vec2 bullet_dir = c->attack_dir; @@ -57,10 +57,6 @@ void InternalShot(Creature* c, } } bullet_dir.Rotate(bullet_angle / 180.0f); -#if 1 - bullet_born_pos.x += c->shoot_offset.x; - bullet_born_pos.y += c->shoot_offset.y; -#endif c->room->frame_event.AddBullet(c, weapon_meta, weapon_lv,