diff --git a/server/gameserver/room.cc b/server/gameserver/room.cc index aa8387c..1d7a30a 100644 --- a/server/gameserver/room.cc +++ b/server/gameserver/room.cc @@ -3914,7 +3914,8 @@ void Room::AirRaid(int airraid_id) } a8::Vec2 dir = a8::Vec2::UP; dir.Rotate(a8::RandAngle()); - a8::Vec2 center = gas_data_.pos_new + dir * (100 + rand() % gas_data_.new_area_meta->i->rad()); + float rnd_rad = gas_data_.new_area_meta->i->rad() > 0 ? rand() % gas_data_.new_area_meta->i->rad() : 0; + a8::Vec2 center = gas_data_.pos_new + dir * (100 + rnd_rad); { std::vector humans; GetAlivePlayers(humans, GetRoomMaxPlayerNum());