1
This commit is contained in:
parent
25b139c3da
commit
40bdf9fa7d
@ -3795,16 +3795,35 @@ void Room::ShuaMon(const a8::Vec2& center, std::vector<int>& airdrop_mon_list)
|
||||
if (hero_meta) {
|
||||
int team_id = 666;
|
||||
Creature* master = nullptr;
|
||||
a8::Vec2 pos = center;
|
||||
a8::Vec2 dir = center;
|
||||
Hero* hero = CreateHero(master,
|
||||
hero_meta,
|
||||
pos,
|
||||
dir,
|
||||
team_id);
|
||||
if (!hero) {
|
||||
abort();
|
||||
}
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < 10; ++i) {
|
||||
a8::Vec2 born_dir = center;
|
||||
a8::Vec2 born_offset(10, 10);
|
||||
born_offset.Rotate(born_dir.CalcAngle(a8::Vec2::UP));
|
||||
born_offset.Rotate(i * 0.5);
|
||||
|
||||
a8::Vec2 hero_pos = center + born_offset;
|
||||
a8::Vec2 dir = center;
|
||||
|
||||
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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user