@@ -563,13 +563,14 @@ void shutdownScriptHooks()
563
563
{
564
564
SV_Commands_Shutdown ();
565
565
566
+ HTTPServer::Shutdown ();
567
+ HTTPClient::Shutdown ();
568
+
566
569
EntityNF::Shutdown ();
567
570
PlayerNF::Shutdown ();
568
571
ScriptThread::Shutdown ();
569
572
ScriptedEvent::Shutdown ();
570
573
571
- HTTPServer::Shutdown ();
572
- HTTPClient::Shutdown ();
573
574
574
575
LONG ret = DetourTransactionBegin ();
575
576
ret = DetourUpdateThread (GetCurrentThread ());
@@ -614,6 +615,7 @@ void startCrashReporter()
614
615
CustomCvar sv_crashrpt_poll_delay (" sv_crashrpt_poll_delay" , " 5" , CVAR_ARCHIVE);// in seconds
615
616
CustomCvar sv_crashrpt_hang_wait (" sv_crashrpt_hang_wait" , " 30" , CVAR_ARCHIVE);// in seconds
616
617
618
+ /*
617
619
HANDLE hLocalProc = GetCurrentProcess();
618
620
HANDLE hGlobalProc;
619
621
@@ -628,7 +630,8 @@ void startCrashReporter()
628
630
gi->Printf("Start crash reporter error 1: %u\n", GetLastError());
629
631
return;
630
632
}
631
-
633
+ */
634
+ DWORD PID = GetCurrentProcessId ();
632
635
STARTUPINFOW si;
633
636
PROCESS_INFORMATION pi;
634
637
@@ -639,7 +642,7 @@ void startCrashReporter()
639
642
auto crashRptPath = mainPath / " CrashReporter.exe" ;
640
643
WCHAR cmdline[2048 ];
641
644
DWORD pollDelay = sv_crashrpt_poll_delay.GetIntValue () * 1000 , hungDelay = sv_crashrpt_hang_wait.GetIntValue () * 1000 ;
642
- wsprintfW (cmdline, L" %s %p %u %u" , crashRptPath.c_str (), hGlobalProc , pollDelay, hungDelay);
645
+ wsprintfW (cmdline, L" %s %p %u %u" , crashRptPath.c_str (), PID , pollDelay, hungDelay);
643
646
if (!CreateProcessW (NULL , // No module name (use command line)
644
647
cmdline, // Command line
645
648
NULL , // Process handle not inheritable
0 commit comments