This commit is contained in:
aozhiwei 2019-09-19 13:26:35 +08:00
parent 5bb68a169e
commit 312c3645b8
2 changed files with 12 additions and 0 deletions

View File

@ -629,6 +629,17 @@ void Human::SyncAroundPlayers(const char* file, int line, const char* func)
for (Human* hum : cell->human_list) { for (Human* hum : cell->human_list) {
hum->AddToNewObjects(this); hum->AddToNewObjects(this);
assert(hum->part_objects.find(this) != hum->part_objects.end()); assert(hum->part_objects.find(this) != hum->part_objects.end());
if (hum->part_objects.find(this) == hum->part_objects.end()) {
if (a8::XGetTickCount() - room->last_debugout_tick > 1000 * 10) {
room->last_debugout_tick = a8::XGetTickCount();
a8::UdpLog::Instance()->Warning("SyncAroundPlayers error file:%s line:%d func:%s",
{
file,
line,
func
});
}
}
} }
} }
} }

View File

@ -47,6 +47,7 @@ public:
MapService map_service; MapService map_service;
long long battle_start_frameno_ = 0; long long battle_start_frameno_ = 0;
long long pending_request = 0; long long pending_request = 0;
long long last_debugout_tick = 0;
~Room(); ~Room();
void Init(); void Init();