This commit is contained in:
aozhiwei 2024-04-28 10:45:09 +08:00
parent 40ad332a7e
commit 544e5b6e67
2 changed files with 21 additions and 10 deletions

View File

@ -199,6 +199,7 @@ enum GunSubEquipType_e
GUN_SUB_EQUIP_TYPE_THREE_GUN = 9, GUN_SUB_EQUIP_TYPE_THREE_GUN = 9,
GUN_SUB_EQUIP_TYPE_LASER_CANNON = 10, GUN_SUB_EQUIP_TYPE_LASER_CANNON = 10,
GUN_SUB_EQUIP_TYPE_FLY_HOOk = 14, GUN_SUB_EQUIP_TYPE_FLY_HOOk = 14,
GUN_SUB_EQUIP_TYPE_FLY_LASER = 15,
GUN_SUB_EQUIP_TYPE_End GUN_SUB_EQUIP_TYPE_End
}; };

View File

@ -125,18 +125,28 @@ void FrameEvent::AddBullet(int bullet_uniid,
} }
{ {
int bullet_idx = room->frame_event_data->bullets_.size() - 1; int bullet_idx = room->frame_event_data->bullets_.size() - 1;
sender.Get()->TraverseAllLayerHumanList if (weapon_meta->equip_subtype() == GUN_SUB_EQUIP_TYPE_FLY_LASER) {
( sender.Get()->room->TraverseHumanList
[bullet_idx, &sender] (Human* hum, bool& stop) (
{ [bullet_idx] (Human* hum) -> bool
{
hum->GetFrameData().bullets_.push_back(bullet_idx);
return true;
});
} else {
sender.Get()->TraverseAllLayerHumanList
(
[bullet_idx, &sender] (Human* hum, bool& stop)
{
#ifdef MYDEBUG1 #ifdef MYDEBUG1
// 999 // 999
if (!hum->InPartObjects(sender.Get())) { if (!hum->InPartObjects(sender.Get())) {
A8_ABORT(); A8_ABORT();
} }
#endif #endif
hum->GetFrameData().bullets_.push_back(bullet_idx); hum->GetFrameData().bullets_.push_back(bullet_idx);
}); });
}
} }
} }