mirror of
https://github.com/rehlds/rehlds.git
synced 2025-03-12 21:40:30 +03:00
Implement -pingboost 4 for behavior similar to mm_insane 1 in Linux
Implemented the Sleep_Pingboost4 function to achieve similar behavior to mm_insane 1 of the mmtimer metamod, since the function does not perform any further action, sleep is removed.
This commit is contained in:
parent
a680f18ee1
commit
0d7726e8a4
@ -146,6 +146,8 @@ void alarmFunc(int num)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Sleep_Pingboost4(int msec);
|
||||||
|
|
||||||
void Sys_InitPingboost()
|
void Sys_InitPingboost()
|
||||||
{
|
{
|
||||||
Sys_Sleep = Sleep_Old;
|
Sys_Sleep = Sleep_Old;
|
||||||
@ -163,12 +165,11 @@ void Sys_InitPingboost()
|
|||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
Sys_Sleep = Sleep_Net;
|
Sys_Sleep = Sleep_Net;
|
||||||
|
|
||||||
// we Sys_GetProcAddress NET_Sleep() from
|
|
||||||
//engine_i486.so later in this function
|
|
||||||
NET_Sleep_Timeout = (NET_Sleep_t)Sys_GetProcAddress(g_pEngineModule, "NET_Sleep_Timeout");
|
NET_Sleep_Timeout = (NET_Sleep_t)Sys_GetProcAddress(g_pEngineModule, "NET_Sleep_Timeout");
|
||||||
break;
|
break;
|
||||||
// just in case
|
case 4: // New case for -pingboost 4
|
||||||
|
Sys_Sleep = Sleep_Pingboost4;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
Sys_Sleep = Sleep_Old;
|
Sys_Sleep = Sleep_Old;
|
||||||
break;
|
break;
|
||||||
@ -176,6 +177,11 @@ void Sys_InitPingboost()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Sleep_Pingboost4(int msec)
|
||||||
|
{
|
||||||
|
// Do nothing, just return without sleep
|
||||||
|
}
|
||||||
|
|
||||||
void Sys_WriteProcessIdFile()
|
void Sys_WriteProcessIdFile()
|
||||||
{
|
{
|
||||||
char *fname;
|
char *fname;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user