diff --git a/server/gameserver/human.cc b/server/gameserver/human.cc index cff1331..3bb8151 100644 --- a/server/gameserver/human.cc +++ b/server/gameserver/human.cc @@ -237,7 +237,7 @@ void Human::DirectShot(MetaData::Equip* bullet_meta, int skill_id) { for (size_t i = 0; i < bullet_meta->bullet_born_offset.size(); ++i) { auto& tuple = bullet_meta->bullet_born_offset[i]; - room->xtimer.AddDeadLineTimerAndAttach(std::get<0>(tuple) * FRAME_RATE_MS, + room->xtimer.AddDeadLineTimerAndAttach(std::get<0>(tuple) / FRAME_RATE_MS, a8::XParams() .SetSender(this) .SetParam1(bullet_meta) @@ -2091,6 +2091,9 @@ void Human::InternalShot(MetaData::Equip* bullet_meta, int skill_id, size_t offs if (offset_idx >= bullet_meta->bullet_born_offset.size()) { return; } + if (dead) { + return; + } const auto& born_points = std::get<1>(bullet_meta->bullet_born_offset[offset_idx]); for (auto& born_point : born_points) { a8::Vec2 bullet_born_offset = born_point.born_offset; @@ -2100,7 +2103,9 @@ void Human::InternalShot(MetaData::Equip* bullet_meta, int skill_id, size_t offs return; } } - room->frame_event.AddShot(this); + if (offset_idx <=0 ) { + room->frame_event.AddShot(this); + } for (auto& born_point : born_points) { a8::Vec2 bullet_born_offset = born_point.born_offset; bullet_born_offset.Rotate(attack_dir.CalcAngle(a8::Vec2::UP));