This commit is contained in:
aozhiwei 2021-05-12 15:54:30 +08:00
parent 25b139c3da
commit 40bdf9fa7d

View File

@ -3795,16 +3795,35 @@ void Room::ShuaMon(const a8::Vec2& center, std::vector<int>& airdrop_mon_list)
if (hero_meta) { if (hero_meta) {
int team_id = 666; int team_id = 666;
Creature* master = nullptr; Creature* master = nullptr;
a8::Vec2 pos = center; for (int i = 0; i < 10; ++i) {
a8::Vec2 dir = center; a8::Vec2 born_dir = center;
Hero* hero = CreateHero(master, a8::Vec2 born_offset(10, 10);
hero_meta, born_offset.Rotate(born_dir.CalcAngle(a8::Vec2::UP));
pos, born_offset.Rotate(i * 0.5);
dir,
team_id); a8::Vec2 hero_pos = center + born_offset;
if (!hero) { a8::Vec2 dir = center;
abort();
} CircleCollider collider;
} collider.pos = hero_pos;
} collider.rad = hero_meta->i->radius();
if (!map_service->CollisionDetection
(
this,
false,
hero_pos,
&collider
)) {
Hero* hero = CreateHero(master,
hero_meta,
hero_pos,
dir,
team_id);
if (!hero) {
abort();
}
}
}//end for i
}//end if
}//end for hero_id
} }