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

View File

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