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_LASER_CANNON = 10,
GUN_SUB_EQUIP_TYPE_FLY_HOOk = 14,
GUN_SUB_EQUIP_TYPE_FLY_LASER = 15,
GUN_SUB_EQUIP_TYPE_End
};

View File

@ -125,6 +125,15 @@ void FrameEvent::AddBullet(int bullet_uniid,
}
{
int bullet_idx = room->frame_event_data->bullets_.size() - 1;
if (weapon_meta->equip_subtype() == GUN_SUB_EQUIP_TYPE_FLY_LASER) {
sender.Get()->room->TraverseHumanList
(
[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)
@ -139,6 +148,7 @@ void FrameEvent::AddBullet(int bullet_uniid,
});
}
}
}
void FrameEvent::RemoveBullet(glm::vec3 pos, int bullet_uniid)
{