This commit is contained in:
aozhiwei 2021-05-06 17:22:17 +08:00
parent b9caccf0f4
commit 6e55160aec

View File

@ -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,