Quote:
Originally Posted by ProdigySim
I believe I have fixed everything in L4DT2 that was broken. You can compile from source from our goooglecode project now. I'll try producing some working builds soon.
|
Glad to hear it.
-------------------------------------------
EDIT:
Some feedbacks here.
1. I've updated 'OnMobRushStart' signature, because it still broken.
PHP Code:
"OnMobRushStart"
{
"library" "server"
"linux" "@_ZN9CDirector14OnMobRushStartEv"
"windows" "\x55\x8B\xEC\x83\xEC\x08\xA1\x74\x2A\x2A\x2A"
/* 55 8B EC 83 EC 08 A1 74 ? ? ? */
}
2. Could not find 'GetMasterServerPlayerCounts' signature. I'll try to find this 'playslots' signature tomorrow.
EDIT 2:
PHP Code:
/* Offset from ConnectClientLobbyCheck to cmp with max players check
string #Valve_Reject_Server_Full
*/
"ValveRejectServerFullFirst"
{
"windows" "30" /* cmp eax, [esi+180h] -> cmp eax, imm32 */
"linux" "32" /* cmp edi, [esi+17ch] -> cmp edi, imm32 */
}
/*********************************************************************
****************** PLAYER SLOTS PATCHING *****************************
*********************************************************************/
/*
* We just override the return value to our own
*
* This method is called for max players when viewing server info
* Overriding this on Linux changes the server browser maxplayers
*
* On Windows overriding it doesn't fix the server browser,
* but it does break scavenge mode (like the map doesn't support scavenge)
*/
"GetMaxHumanPlayers"
{
"library" "server"
"linux" "@_ZNK16CTerrorGameRules18GetMaxHumanPlayersEv"
}
/*
* int CBaseServer::GetMasterServerPlayerCounts(int &, int &, int &)
*
* Used to override server browser maxplayers reporting (Windows)
*
* Search for string: "increased_maxplayers" then jump to second call
*/
"GetMasterServerPlayerCounts"
{
"library" "engine"
"linux" "@_ZN11CBaseServer27GetMasterServerPlayerCountsERiS0_S0_"
"windows" "\x55\x8B\xEC\x56\x8B\xF1\xE8\x2A\x2A\x2A\x2A\x8B\x4D\x2A\x89\x01\x8B\x0D\x2A\x2A\x2A\x2A\x85\xC9\x74"
/* windows: 55 8B EC 56 8B F1 E8 ? ? ? ? 8B 4D ? 89 01 8B 0D ? ? ? ? 85 C9 74 */
}
/* Not an actual function,
this is inside CBaseServer::ConnectClient (a jz instruction)
use it to remove skippable code when sv_allow_lobby_connect 0
*/
"ConnectClientLobbyCheck"
{
/* look for "#Valve_Reject_Server_Full" */
"library" "engine"
"linux" "\x8B\x2A\x2A\x8B\x03\x8B\x2A\x2A\x89\x2A\x2A\x89\x2A\x2A\xFF\x2A\x2A\x89\xC6\x8B\x03\x89\x2A\x2A\xFF\x2A\x2A\x29\xC6"
/* linux: 8B ? ? 8B 03 8B ? ? 89 ? ? 89 ? ? FF ? ? 89 C6 8B 03 89 ? ? FF ? ? 29 C6 */
"windows" "\x74\x2A\x8B\x55\x2A\x8B\x06\x8B\x7A\x2A\x8B\x50"
/* windows: 74 ? 8B 55 ? 8B 06 8B 7A ? 8B 50 */
}
/* Not an actual function,
This rejects players when there are all full human players
string "Human player limit reached (%d/%d)"
deprecated on linux: This function checks GetMaxHumanPlayers
on linux, so patching this to an unconditional jump
removes a check on maxplayers.
*/
"HumanPlayerLimitReached"
{
"library" "server"
"windows" "\x7C\x2A\x8B\x2A\x2A\x8B\x2A\x2A\x50\x57\x68\x2A\x2A\x2A\x2A\x51\x52\xE8\x2A\x2A\x2A\x2A\x83\xC4\x2A\x5F\x5E\x32\xC0\x5B"
/* windows: 7C ? 8B ? ? 8B ? ? 50 57 68 ? ? ? ? 51 52 E8 ? ? ? ? 83 C4 ? 5F 5E 32 C0 5B */
}
3. I got a crash
(Win/Vanilla server) seems like it happend when 'CDirector::GetScriptValue(%s,%d) has been called' (left4downtown2 debug log below/I know it will help).
EDIT 3:
Forwards that causes a crash:
PHP Code:
forward Action:L4D_OnGetScriptValueInt(const String:key[], &retVal);
forward Action:L4D_OnGetScriptValueFloat(const String:key[], &Float:retVal);
forward Action:L4D_OnGetScriptValueString(const String:key[], const String:defaultVal[], String:retVal[128]);
I have temporary solution (Win) which excludes 3 forwards above, until ProdigySim fixes it. Not sure about "ValveRejectServerFullFirst" offset I hope I fixed playslots gamedata.