This commit is contained in:
aozhiwei 2021-06-25 16:55:13 +08:00
parent 66c45210c9
commit 31c1c73ec7

View File

@ -3969,7 +3969,8 @@ void Room::AirRaid(int airraid_id)
);
a8::Vec2 dir = a8::Vec2::UP;
dir.Rotate(a8::RandAngle());
a8::Vec2 pos = center + dir * (50 + rand() % 100);;
a8::Vec2 pos = center + dir * (50 + rand() % 100);
if (room->grid_service->CanAdd(pos.x, pos.y)) {
RoomObstacle* obstacle = room->CreateObstacle
(
raid_meta->i->bomb_id(),
@ -3977,6 +3978,7 @@ void Room::AirRaid(int airraid_id)
pos.y
);
obstacle->Active();
}
};
Room* room = (Room*)param.sender.GetUserData();
if (room->IsGameOver()) {