Guest Ezrekith Posted November 21, 2017 Share Posted November 21, 2017 (edited) game / src / packet_info.cpp void CPacketInfo::Log(const char * c_pszFileName) Replace with: void CPacketInfo::Log(const char * c_pszFileName) { #ifdef _I_Need_Packet_Info_Cause_My_Dingdong_Is_Heavy_Any_My_Cat_Cant_Handle_It_Oo_ FILE * fp; fp = fopen(c_pszFileName, "w"); if (!fp) return; std::map<int, TPacketElement *>::iterator it = m_pPacketMap.begin(); fprintf(fp, "Name Called Load Ratio\n"); while (it != m_pPacketMap.end()) { TPacketElement * p = it->second; ++it; fprintf(fp, "%-16s %-10d %-10u %.2f\n", p->stName.c_str(), p->iCalled, p->dwLoad, p->iCalled != 0 ? (float) p->dwLoad / p->iCalled : 0.0f); } fclose(fp); #endif } If you ever decide to use it again just define this in your service.h: #define _I_Need_Packet_Info_Cause_My_Dingdong_Is_Heavy_Any_My_Cat_Cant_Handle_It_Oo_ p2p_packet_info.txt Replace this: CPacketInfoGG::~CPacketInfoGG() CPacketInfoGG::~CPacketInfoGG() { #ifdef _I_Need_Packet_Info_Cause_My_Dingdong_Is_Heavy_Any_My_Cat_Cant_Handle_It_Oo_ Log("p2p_packet_info.txt"); #endif } udp_packet_info.txt game / src / input_udp.cpp CPacketInfoUDP::~CPacketInfoUDP() replace this CPacketInfoUDP::~CPacketInfoUDP() { #ifdef _I_Need_Packet_Info_Cause_My_Dingdong_Is_Heavy_Any_My_Cat_Cant_Handle_It_Oo_ Log("udp_packet_info.txt"); #endif } db / src / clientmanager.cpp void UsageLog() replace with this: void UsageLog() { #ifdef asd FILE* fp = NULL; time_t ct; char *time_s; struct tm lt; int avg = g_dwUsageAvg / 3600; // 60 ĂĘ * 60 şĐ fp = fopen("usage.txt", "a+"); if (!fp) return; ct = time(0); lt = *localtime(&ct); time_s = asctime(<); time_s[strlen(time_s) - 1] = '\0'; fprintf(fp, "| %4d %-15.15s | %5d | %5u |", lt.tm_year + 1900, time_s + 4, avg, g_dwUsageMax); fprintf(fp, "\n"); fclose(fp); g_dwUsageMax = g_dwUsageAvg = 0; #endif } Delete the txt files from the ch + db folers (Or if you'd like to delete the whole function, just delete it from the cpp and h file.) Edited November 21, 2017 by Ezrekith Link to comment Share on other sites More sharing options...
Aeglon Posted November 21, 2017 Share Posted November 21, 2017 (edited) Why\when we need to Disable it? Edited November 21, 2017 by Aeglon Link to comment Share on other sites More sharing options...
Guest Ezrekith Posted November 21, 2017 Share Posted November 21, 2017 If you don't like it in your CH folders. It's kinda useless cause it have literally 0 functions. The game just logging the packets into a txt without any reason. Link to comment Share on other sites More sharing options...
Martinez Posted September 1, 2019 Share Posted September 1, 2019 Thy Link to comment Share on other sites More sharing options...
M2 Supp Posted December 4, 2019 Share Posted December 4, 2019 Thanks for share this really good Link to comment Share on other sites More sharing options...
P3NG3R Posted November 6, 2021 Share Posted November 6, 2021 thankyou Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now