8.空袭,恢复正常,支持测试配置
This commit is contained in:
parent
f58f5acf65
commit
4b256e23bc
@ -3928,11 +3928,20 @@ void Room::AirRaid(int airraid_id)
|
|||||||
}
|
}
|
||||||
a8::Vec2 dir = a8::Vec2::UP;
|
a8::Vec2 dir = a8::Vec2::UP;
|
||||||
dir.Rotate(a8::RandAngle());
|
dir.Rotate(a8::RandAngle());
|
||||||
a8::Vec2 center = gas_data_.pos_new + dir * (500 + rand() % 300);
|
a8::Vec2 center = gas_data_.pos_new + dir * (100 + rand() % gas_data_.new_area_meta->i->rad());
|
||||||
#if 1
|
#if 1
|
||||||
Player* hum = GetOneAlivePlayer();
|
{
|
||||||
if (hum) {
|
std::vector<Player*> humans;
|
||||||
center = hum->GetPos();
|
GetAlivePlayers(humans, GetRoomMaxPlayerNum());
|
||||||
|
if (humans.size() > 3) {
|
||||||
|
std::random_shuffle(humans.begin(), humans.end());
|
||||||
|
for (Human* hum : humans) {
|
||||||
|
if (!hum->poisoning) {
|
||||||
|
center = hum->GetPos() + dir * (200 + rand() % 500);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
frame_event.AddAirRaid(raid_meta->i->appear_time(), center, raid_meta->i->rad());
|
frame_event.AddAirRaid(raid_meta->i->appear_time(), center, raid_meta->i->rad());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user