1
This commit is contained in:
parent
f2ff2b65af
commit
4b1ec48701
@ -323,7 +323,8 @@ void Buff::ProcSputteringFunc(Bullet* bullet)
|
||||
bullet_dir,
|
||||
0,
|
||||
0,
|
||||
0);
|
||||
0,
|
||||
nullptr);
|
||||
VirtualBullet* p = new VirtualBullet();
|
||||
p->bullet_uniid = bullet_uniid;
|
||||
p->weapon_uniid = bullet->weapon_uniid;
|
||||
|
@ -89,7 +89,8 @@ void FrameEvent::AddBullet(int bullet_uniid,
|
||||
const glm::vec3& dir,
|
||||
float fly_distance,
|
||||
int trace_target_id,
|
||||
int hand)
|
||||
int hand,
|
||||
std::shared_ptr<std::set<int>> reporter_list)
|
||||
{
|
||||
{
|
||||
auto& tuple = a8::FastAppend(room->frame_event_data->bullets_);
|
||||
@ -108,6 +109,11 @@ void FrameEvent::AddBullet(int bullet_uniid,
|
||||
p.set_trace_target_uniid(trace_target_id);
|
||||
}
|
||||
p.set_hand(hand);
|
||||
if (reporter_list) {
|
||||
for (int reporter : *reporter_list.get()) {
|
||||
p.add_reporter_list(reporter);
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
int bullet_idx = room->frame_event_data->bullets_.size() - 1;
|
||||
|
@ -25,7 +25,8 @@ public:
|
||||
const glm::vec3& dir,
|
||||
float fly_distance,
|
||||
int trace_target_id,
|
||||
int hand);
|
||||
int hand,
|
||||
std::shared_ptr<std::set<int>> reporter_list);
|
||||
void RemoveBullet(glm::vec3 pos, int bullet_uniid);
|
||||
void AddExplosion(Bullet* bullet, int item_id, Position bomb_pos);
|
||||
void AddSmoke(Bullet* bullet, int item_id, glm::vec3 pos, float time_addition);
|
||||
|
@ -1603,8 +1603,8 @@ void Player::UpdateThrowBomb()
|
||||
bomb_dir,
|
||||
throw_bomb->fly_distance(),
|
||||
0,
|
||||
1
|
||||
);
|
||||
1,
|
||||
nullptr);
|
||||
pending_throw_bomb[throw_uniid] = throw_bomb;
|
||||
room->xtimer.SetTimeoutEx
|
||||
(
|
||||
|
@ -216,7 +216,7 @@ static void InternalCreateBullet(BulletInfo& bullet_info)
|
||||
bullet_info.keep_shot_animi_timer_ptr,
|
||||
bullet_info.shot_animi_time,
|
||||
bullet_info.weapon_buff_id,
|
||||
nullptr);
|
||||
bullet_info.reporter_list);
|
||||
#ifdef DEBUG1
|
||||
if (bullet_info.c.Get()->IsPlayer()) {
|
||||
bullet_info.c.Get()->SendDebugMsg(a8::Format("CreateBullet id:%d",
|
||||
@ -247,16 +247,6 @@ static void InternalCreateBullet(BulletInfo& bullet_info)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG1
|
||||
DebugCmd::CreateSphere(c,
|
||||
glm::vec3(
|
||||
bullet_info.bullet_born_pos.x,
|
||||
bullet_info.bullet_born_pos.y,
|
||||
bullet_info.bullet_born_pos.z),
|
||||
glm::vec3(1, 1, 1),
|
||||
c->room->AllocUniid());
|
||||
#endif
|
||||
|
||||
c->room->frame_event.AddBullet
|
||||
(bullet_uniid,
|
||||
c->GetWeakPtrRef(),
|
||||
@ -266,7 +256,8 @@ static void InternalCreateBullet(BulletInfo& bullet_info)
|
||||
bullet_info.bullet_dir,
|
||||
bullet_info.fly_distance,
|
||||
bullet_info.trace_target_uniid,
|
||||
bullet_info.hand);
|
||||
bullet_info.hand,
|
||||
bullet_info.reporter_list);
|
||||
if (bullet_uniid && (bullet_info.trace_target_uniid || bullet_info.reporter_list)) {
|
||||
c->room->AddReportBullet(
|
||||
bullet_uniid
|
||||
|
Loading…
x
Reference in New Issue
Block a user