This commit is contained in:
aozhiwei 2023-03-02 14:17:15 +08:00
parent 3e5db8026a
commit 0ab7d1561d
5 changed files with 28 additions and 6 deletions

View File

@ -320,7 +320,7 @@ void Buff::ProcSputteringFunc(Bullet* bullet)
owner->GetWeakPtrRef(),
weapon_meta,
1,
bullet_born_pos,
bullet_born_pos.ToGlmVec3(),
bullet_dir,
0,
0,

View File

@ -85,8 +85,8 @@ void FrameEvent::AddBullet(int bullet_uniid,
CreatureWeakPtr& sender,
const mt::Equip* weapon_meta,
int weapon_lv,
Position born_pos,
glm::vec3 dir,
const glm::vec3& born_pos,
const glm::vec3& dir,
float fly_distance,
int trace_target_id,
int hand)

View File

@ -21,8 +21,8 @@ public:
CreatureWeakPtr& sender,
const mt::Equip* weapon_meta,
int weapon_lv,
Position born_pos,
glm::vec3 dir,
const glm::vec3& born_pos,
const glm::vec3& dir,
float fly_distance,
int trace_target_id,
int hand);

View File

@ -1646,6 +1646,28 @@ void Player::UpdateThrowBomb()
weapon.ammo,
true
);
glm::vec3 bomb_pos = glm::vec3(
throw_bomb->pos().x(),
throw_bomb->pos().y(),
throw_bomb->pos().z()
);
glm::vec3 bomb_dir = glm::vec3(
throw_bomb->dir().x(),
throw_bomb->dir().y(),
throw_bomb->dir().z()
);
room->frame_event.AddBullet
(
room->AllocUniid(),
GetWeakPtrRef(),
equip_meta,
1,
bomb_pos,
bomb_dir,
throw_bomb->fly_distance(),
0,
1
);
pending_throw_bomb[throw_bomb->throw_uniid()] = throw_bomb;
}
}

View File

@ -253,7 +253,7 @@ static void InternalCreateBullet(BulletInfo& bullet_info)
c->GetWeakPtrRef(),
bullet_info.weapon_meta,
bullet_info.weapon_lv,
bullet_info.bullet_born_pos,
bullet_info.bullet_born_pos.ToGlmVec3(),
bullet_info.bullet_dir,
bullet_info.fly_distance,
bullet_info.trace_target_uniid,