1
This commit is contained in:
parent
829d1bb98f
commit
d420519c92
@ -61,7 +61,20 @@ void AirDrop::Exec(int appear_time, int box_id, int airdrop_id)
|
|||||||
#endif
|
#endif
|
||||||
const mt::MapThing* thing_meta = mt::MapThing::GetById(box_id);
|
const mt::MapThing* thing_meta = mt::MapThing::GetById(box_id);
|
||||||
if (thing_meta && thing_meta->type() == 2) {
|
if (thing_meta && thing_meta->type() == 2) {
|
||||||
|
glm::vec3 random_pt;
|
||||||
|
if (!room_->RandomSafeAreaPoint(random_pt)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
glm::vec3 box_pos;
|
glm::vec3 box_pos;
|
||||||
|
if (!room_->FindWalkablePointWithOutHouse
|
||||||
|
(
|
||||||
|
random_pt,
|
||||||
|
10,
|
||||||
|
10,
|
||||||
|
box_pos
|
||||||
|
)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
room_->frame_event.AddAirDrop(appear_time, box_id, box_pos);
|
room_->frame_event.AddAirDrop(appear_time, box_id, box_pos);
|
||||||
room_->xtimer.SetTimeoutEx
|
room_->xtimer.SetTimeoutEx
|
||||||
(SERVER_FRAME_RATE * appear_time / 1000.f,
|
(SERVER_FRAME_RATE * appear_time / 1000.f,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user