This commit is contained in:
aozhiwei 2023-04-01 18:34:03 +08:00
parent 8de1da34f2
commit 16662eaed7

View File

@ -83,34 +83,37 @@ void Incubator::AllocAndroid(Human* target, int num)
10 * room->GetMapMeta()->scale(),
point
)) {
room->map_instance->UnScale(point);
Global::Instance()->verify_set_pos = 1;
hum->GetMutablePos().FromGlmVec3(point);
Global::Instance()->verify_set_pos = 0;
room->EnableHuman(hum);
if (!CanSee(hum, target)) {
room->EnableHuman(hum);
#ifdef DEBUG
#if 0
if (!target->InNewObjects(hum)) {
A8_ABORT();
}
if (!target->InNewObjects(hum)) {
A8_ABORT();
}
#endif
if (hum->dead) {
A8_ABORT();
}
if (hum->dead) {
A8_ABORT();
}
#endif
hum->MustBeAddBuff(hum, kTraceBuffId);
hold_humans_.erase(hold_humans_.begin());
--num;
hum->MustBeAddBuff(hum, kTraceBuffId);
hold_humans_.erase(hold_humans_.begin());
--num;
#ifdef DEBUG
room->BroadcastDebugMsg(a8::Format("投放机器人 %d:%s pos:%d,%d pos1:%d,%d %d num:%d",
{hum->GetUniId(),
hum->name,
hum->GetPos().GetX(),
hum->GetPos().GetY(),
target->GetPos().GetX(),
target->GetPos().GetY(),
hum->GetPos().Distance2D2(target->GetPos()),
hold_humans_.size()}));
room->BroadcastDebugMsg(a8::Format("投放机器人 %d:%s pos:%d,%d pos1:%d,%d %d num:%d",
{hum->GetUniId(),
hum->name,
hum->GetPos().GetX(),
hum->GetPos().GetY(),
target->GetPos().GetX(),
target->GetPos().GetY(),
hum->GetPos().Distance2D2(target->GetPos()),
hold_humans_.size()}));
#endif
}
}
++try_count;
}