This commit is contained in:
aozhiwei 2024-02-08 18:29:05 +08:00
parent 250ab2ee00
commit 3cbdd2b407

View File

@ -32,6 +32,7 @@ static const auto hero_transform =
struct BulletInfo
{
CreatureWeakPtr c;
CreatureWeakPtr shot_passenger;
long long weapon_uniid = 0;
const mt::Equip* weapon_meta = nullptr;
const mt::Equip* bullet_meta = nullptr;
@ -237,7 +238,7 @@ static void InternalCreateBullet(BulletInfo& bullet_info)
!(c->HasBuffEffect(kBET_Jump) || c->HasBuffEffect(kBET_Fly))) {
bullet_uniid = c->room->CreateBullet
(c,
c->shot_passenger,
bullet_info.shot_passenger.Get(),
bullet_info.weapon_meta,
bullet_info.bullet_meta,
bullet_info.skill_meta,
@ -485,6 +486,9 @@ void InternalShot(Creature* c,
{
BulletInfo bullet_info;
bullet_info.c = c->GetWeakPtrRef();
if (c->shot_passenger) {
bullet_info.shot_passenger.Attach(c->shot_passenger);
}
bullet_info.weapon_uniid = weapon_uniid;
bullet_info.weapon_meta = weapon_meta;
bullet_info.skill_meta = skill_meta;