1
This commit is contained in:
parent
8388a658e5
commit
2eed297b49
@ -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) {
|
for (size_t i = 0; i < bullet_meta->bullet_born_offset.size(); ++i) {
|
||||||
auto& tuple = bullet_meta->bullet_born_offset[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()
|
a8::XParams()
|
||||||
.SetSender(this)
|
.SetSender(this)
|
||||||
.SetParam1(bullet_meta)
|
.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()) {
|
if (offset_idx >= bullet_meta->bullet_born_offset.size()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (dead) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const auto& born_points = std::get<1>(bullet_meta->bullet_born_offset[offset_idx]);
|
const auto& born_points = std::get<1>(bullet_meta->bullet_born_offset[offset_idx]);
|
||||||
for (auto& born_point : born_points) {
|
for (auto& born_point : born_points) {
|
||||||
a8::Vec2 bullet_born_offset = born_point.born_offset;
|
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;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (offset_idx <=0 ) {
|
||||||
room->frame_event.AddShot(this);
|
room->frame_event.AddShot(this);
|
||||||
|
}
|
||||||
for (auto& born_point : born_points) {
|
for (auto& born_point : born_points) {
|
||||||
a8::Vec2 bullet_born_offset = born_point.born_offset;
|
a8::Vec2 bullet_born_offset = born_point.born_offset;
|
||||||
bullet_born_offset.Rotate(attack_dir.CalcAngle(a8::Vec2::UP));
|
bullet_born_offset.Rotate(attack_dir.CalcAngle(a8::Vec2::UP));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user