This commit is contained in:
aozhiwei 2024-02-02 16:13:29 +08:00
parent 734c4d958c
commit 18367b8c17

View File

@ -1532,23 +1532,28 @@ void Room::UpdateGasInactiveMoba()
battle_start_frameno_ = GetFrameNo();
#if 1
App::Instance()->verify_set_pos = 1;
for (auto& pair : human_hash_) {
Human* hum = pair.second;
if (!hum->GetBornPoint()) {
abort();
} else {
hum->SetPos(hum->GetBornPoint()->RandPoint(this));
}
a8::XPrintf("set_pos side:%d %d pos:%f %f %f\n", {
hum->side,
hum->GetUniId(),
hum->GetPos().GetX(),
hum->GetPos().GetY(),
hum->GetPos().GetZ(),
});
hum->GetMovement()->ClearPath();
grid_service->MoveCreature(hum);
}
TraverseHumanList
(
[this] (Human* ele_hum) -> bool
{
Human* hum = ele_hum;
if (!hum->GetBornPoint()) {
abort();
} else {
hum->SetPos(hum->GetBornPoint()->RandPoint(this));
}
#ifdef MYDEBUG
a8::XPrintf("set_pos side:%d %d pos:%f %f %f\n", {
hum->side,
hum->GetUniId(),
hum->GetPos().GetX(),
hum->GetPos().GetY(),
hum->GetPos().GetZ(),
});
#endif
hum->GetMovement()->ClearPath();
grid_service->MoveCreature(hum);
});
App::Instance()->verify_set_pos = 0;
for (auto& pair : team_hash_) {
pair.second->GenBattleUuid();