This commit is contained in:
aozhiwei 2020-06-01 16:51:45 +08:00
parent c4e742f90d
commit a39bf98d56

View File

@ -1835,8 +1835,12 @@ void Room::ProcShuaAndroid(int shua_time, int shua_num)
GetCanEnableAndroids(humans, real_shua_num);
for (auto& hum : humans) {
a8::Vec2 pos = target->GetPos();
a8::Vec2 dir = a8::Vec2::UP;
dir.Rotate(a8::RandAngle());
a8::Vec2 dir = target->move_dir;
if (rand() % 100 < 80) {
dir.Rotate(a8::RandAngle() / 2.0f);
} else {
dir.Rotate(a8::RandAngle());
}
pos = pos + dir * SHUA_RANGE;
if (OverBorder(pos, hum->GetRadius())) {
pos.x = target->GetPos().x;