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) {
|
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 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;
|
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* hero = CreateHero(master,
|
||||||
hero_meta,
|
hero_meta,
|
||||||
pos,
|
hero_pos,
|
||||||
dir,
|
dir,
|
||||||
team_id);
|
team_id);
|
||||||
if (!hero) {
|
if (!hero) {
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}//end for i
|
||||||
|
}//end if
|
||||||
|
}//end for hero_id
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user