1
This commit is contained in:
parent
396edd9845
commit
ff5f5f4c39
@ -3918,6 +3918,12 @@ void Room::AirRaid(int airraid_id)
|
||||
a8::Vec2 dir = a8::Vec2::UP;
|
||||
dir.Rotate(a8::RandAngle());
|
||||
a8::Vec2 center = gas_data_.pos_new + dir * (500 + rand() % 300);
|
||||
#if 1
|
||||
Player* hum = GetOneAlivePlayer();
|
||||
if (hum) {
|
||||
center = hum->GetPos();
|
||||
}
|
||||
#endif
|
||||
frame_event.AddAirRaid(raid_meta->i->appear_time(), center, raid_meta->i->rad());
|
||||
|
||||
auto raid_cb =
|
||||
@ -3934,7 +3940,9 @@ void Room::AirRaid(int airraid_id)
|
||||
param.param3.GetDouble()
|
||||
);
|
||||
for (int i = 0; i < raid_meta->i->bomb_num(); ++i) {
|
||||
a8::Vec2 pos = center;
|
||||
a8::Vec2 dir = a8::Vec2::UP;
|
||||
dir.Rotate(a8::RandAngle());
|
||||
a8::Vec2 pos = center + dir * (50 + rand() % 100);;
|
||||
RoomObstacle* obstacle = room->CreateObstacle
|
||||
(
|
||||
raid_meta->i->bomb_id(),
|
||||
@ -3943,6 +3951,9 @@ void Room::AirRaid(int airraid_id)
|
||||
);
|
||||
if (obstacle) {
|
||||
}
|
||||
#if 1
|
||||
room->BroadcastDebugMsg(a8::Format("airraid pos=%d:%d", {pos.x, pos.y}));
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user