diff --git a/server/gameserver/human.cc b/server/gameserver/human.cc index 94719b6..8313101 100644 --- a/server/gameserver/human.cc +++ b/server/gameserver/human.cc @@ -692,6 +692,7 @@ void Human::SyncAroundPlayers(const char* file, int line, const char* func) return; } #ifdef DEBUG + #if 0 room->CheckPartObjects(); a8::UdpLog::Instance()->Debug("room_idx:%d syncaround begin %s %d %s", { @@ -701,12 +702,14 @@ void Human::SyncAroundPlayers(const char* file, int line, const char* func) func }); #endif + #endif TouchAllLayerHumanList ( [this, file, line, func] (Human* hum, bool& stop) { hum->AddToNewObjects(this); #ifdef DEBUG + #if 0 { std::string objs_str; for (auto& obj : hum->part_objects) { @@ -723,6 +726,7 @@ void Human::SyncAroundPlayers(const char* file, int line, const char* func) } room->CheckPartObjects(hum, this); hum->InPartObjects(this); + #endif #endif assert(hum->part_objects.find(this) != hum->part_objects.end()); if (hum->part_objects.find(this) == hum->part_objects.end()) { @@ -741,6 +745,7 @@ void Human::SyncAroundPlayers(const char* file, int line, const char* func) } }); #ifdef DEBUG + #if 0 room->CheckPartObjects(); a8::UdpLog::Instance()->Debug("syncaround end %s %d %s", { @@ -748,6 +753,7 @@ void Human::SyncAroundPlayers(const char* file, int line, const char* func) line, func }); + #endif #endif } @@ -3277,12 +3283,14 @@ void Human::ProcDecGridList(std::set& old_grids, AddOutObjects(hum); hum->AddOutObjects(this); #ifdef DEBUG + #if 0 a8::UdpLog::Instance()->Debug("addoutobjects %d %d", { (long long)hum, hum->GetEntityUniId() }); #endif + #endif } }); room->grid_service->TouchAllLayerEntityList diff --git a/server/gameserver/metamgr.cc b/server/gameserver/metamgr.cc index 241a0cd..e779cf4 100755 --- a/server/gameserver/metamgr.cc +++ b/server/gameserver/metamgr.cc @@ -60,7 +60,7 @@ public: std::list robot_meta_list; std::vector robot_list; std::list ai_meta_list; - std::vector ai_list; + std::list ai_list; std::map parameter_hash; std::map gamemap_hash; diff --git a/server/gameserver/room.cc b/server/gameserver/room.cc index 5ccc88f..04a21c6 100644 --- a/server/gameserver/room.cc +++ b/server/gameserver/room.cc @@ -533,6 +533,7 @@ void Room::RemoveObjectLater(RoomEntity* entity) } entity->room->RemoveFromEntityHash(entity); #ifdef DEBUG + #if 0 a8::UdpLog::Instance()->Debug ( "remove object pointer:%d uniid:%d", @@ -541,6 +542,7 @@ void Room::RemoveObjectLater(RoomEntity* entity) entity->GetEntityUniId() } ); + #endif #endif delete entity; }; @@ -2371,6 +2373,7 @@ bool Room::RuningInTimer() #ifdef DEBUG void Room::InitDebugInfo() { + #if 0 xtimer.AddRepeatTimer ( SERVER_FRAME_RATE * 3, @@ -2385,14 +2388,17 @@ void Room::InitDebugInfo() room->RealAliveCount() }); }); + #endif } void Room::UnInitDebugInfo() { + #if 0 a8::UdpLog::Instance()->Debug("destroy room_idx:%d", { GetRoomIdx() }); + #endif } #endif @@ -2906,6 +2912,9 @@ void Room::InitAndroidAI() } } for (Android* hum : androids) { +#if 1 + hum->SetAiLevel(2); +#endif if (IsMiniRoom()) { int rnd = rand() % MetaMgr::Instance()->mini_room_ai_weights_space; ++rnd;