Raised This Month: $32 Target: $400
 8% 

[EXTENSION] Left 4 Downtown 2 (0.5.4.2) - L4D2 Only, Updated Left4Downtown


Post New Thread Reply   
 
Thread Tools Display Modes
Shadowysn
Senior Member
Join Date: Sep 2015
Location: Location:
Old 05-10-2018 , 00:38   Re: [EXTENSION] Left 4 Downtown 2 (0.5.4.2) - L4D2 Only, Updated Left4Downtown
Reply With Quote #961

Quote:
Originally Posted by Merudo View Post
Alright, I compiled the fixed Left 4 Downtown 2 extension for windows according to Spirit_12's instructions.

To compile it, I used the source code & gamedata from the first post, and replaced player_slots.h and player_slots.cpp by the files from the Attano fork.

I also added Attano's signatures for Linux:

-CTerrorWeapon__OnHit
-CBasePlayer::WaterMove
-CTerrorGameRules__GetMissionInfo
-CBaseServer__FillServerInfo
-VanillaModeOffset

I took the liberty to include Spirit_12's linux files in the zip. Hence, the extension should work on both linux and windows.

EDIT: Playerslots doesn't work on windows, l4d_maxplayers can't be set above 8. Get l4dtoolz instead.
It seems Left 4 Downtown has prevented most of the people from joining my local server. I tried to disable many plugins to see which was the obstacle, but in the end it was the very extension i wanted that was guilty.

Local server was working a few days ago, with no one unable to connect.

They'd seem to wait a long time trying to join, and then '*player* unpaused the game' appears in the console but the person doesn't show up in the game. After waiting a bit they may get disconnected.

There would be mostly only one person that can connect, for reasons unknown.

Last edited by Shadowysn; 05-10-2018 at 00:39.
Shadowysn is offline
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 05-10-2018 , 05:13   Re: [EXTENSION] Left 4 Downtown 2 (0.5.4.2) - L4D2 Only, Updated Left4Downtown
Reply With Quote #962

Quote:
Originally Posted by Shadowysn View Post
It seems Left 4 Downtown has prevented most of the people from joining my local server. I tried to disable many plugins to see which was the obstacle, but in the end it was the very extension i wanted that was guilty.

Local server was working a few days ago, with no one unable to connect.

They'd seem to wait a long time trying to join, and then '*player* unpaused the game' appears in the console but the person doesn't show up in the game. After waiting a bit they may get disconnected.

There would be mostly only one person that can connect, for reasons unknown.
Local servers are not reliable for handling SourceMod. If you want to host with full SourceMod compatibility, host a dedicated server. Local servers are more for testing simple plugins or messing around in by yourself. I've tried hosting a local server before and I always encountered bugs with various plugins returning errors that otherwise don't show up when on a dedicated server.
__________________
Psyk0tik is offline
lionchin
Junior Member
Join Date: Mar 2018
Old 06-06-2018 , 07:28   Re: [EXTENSION] Left 4 Downtown 2 (0.5.4.2) - L4D2 Only, Updated Left4Downtown
Reply With Quote #963

Where is server.cfg? Can anyone please tell me?

Thank you!
lionchin is offline
Visual77
Veteran Member
Join Date: Jan 2009
Old 06-06-2018 , 08:16   Re: [EXTENSION] Left 4 Downtown 2 (0.5.4.2) - L4D2 Only, Updated Left4Downtown
Reply With Quote #964

Quote:
Originally Posted by lionchin View Post
Where is server.cfg? Can anyone please tell me?

Thank you!
You've already asked that and someone already replied to you.
Visual77 is offline
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 06-06-2018 , 09:04   Re: [EXTENSION] Left 4 Downtown 2 (0.5.4.2) - L4D2 Only, Updated Left4Downtown
Reply With Quote #965

Quote:
Originally Posted by lionchin View Post
Where is server.cfg? Can anyone please tell me?

Thank you!
I already answered your question here: https://forums.alliedmods.net/showpo...0&postcount=19
__________________
Psyk0tik is offline
ilham92-cc-sakura
Senior Member
Join Date: Oct 2008
Location: /var/www/index.html
Old 06-19-2018 , 09:13   Re: [EXTENSION] Left 4 Downtown 2 (0.5.4.2) - L4D2 Only, Updated Left4Downtown
Reply With Quote #966

Guys, I tried to compile with playerslots version, what I do:
Code:
cd ~/Documents

git clone --recurse-submodules https://github.com/alliedmodders/sourcemod sourcemod
git clone --recurse-submodules https://github.com/alliedmodders/metamod-source mmsource
hg clone https://hg.alliedmods.net/hl2sdks/hl2sdk-l4d2 hl2sdk

# prevent extension compile with master commit, downgrade one step version
# if compile aginst latest master commit, server use stable build, error: Plugin requires newer Metamod version (16 > 15)
cd sourcemod
git checkout sourcemod-1.7.2

cd ../mmsource
git checkout mmsource-1.10.6

cd ..
mkdir -p plugins/extensions
cd plugins/extensions
git clone https://github.com/Attano/Left4Downtown2
cd Left4Downtown2

make
make playerslots
then I try playerslots version, and put l4d_maxplayers 12 for example.
it turn out very buggy.

first... in Steam Group Server, it show 0/8
second in Server Browser, it shouw 0/12
third, only 7 player able to connect, player 8th begin kicked due to "full"

also I run along side l4d2_unreservelobby.sp to take control lobby reservation.
__________________
ilham92-cc-sakura is offline
Spirit_12
Veteran Member
Join Date: Dec 2012
Location: Toronto, CA
Old 06-19-2018 , 16:12   Re: [EXTENSION] Left 4 Downtown 2 (0.5.4.2) - L4D2 Only, Updated Left4Downtown
Reply With Quote #967

Quote:
Originally Posted by ilham92-cc-sakura View Post
Guys, I tried to compile with playerslots version, what I do:

then I try playerslots version, and put l4d_maxplayers 12 for example.
it turn out very buggy.

first... in Steam Group Server, it show 0/8
second in Server Browser, it shouw 0/12
third, only 7 player able to connect, player 8th begin kicked due to "full"
Player slots has been broken for Windows for a long while. Game Data needs to be updated as you can read in this section.

PHP Code:
/*********************************************************************
****************** PLAYER SLOTS PATCHING *****************************
*********************************************************************/

            /*
            * CTerrorGameRules::GetMaxHumanPlayers(void)
            * 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)
            *
            * Find via string "playercontrolledzombies", unique in Linux, inlined a few times in Windows
            * look for an inline that is very short and returns either 8 or 4 as a result
            * Commented out since the note above suggests it breaks scavenge?
            * Since it is inlined, its signature will look a LOT like CTerrorGameRules::HasPlayerControlledZombies()
            * this sig is probably also excessively wild carded (lots of very short local jumps that are probably safe)
            */
            
"GetMaxHumanPlayers"
            
{
                
"library" "server"
                "linux" "@_ZNK16CTerrorGameRules18GetMaxHumanPlayersEv"
//                "windows" "\xF7\x05\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x74\x2A\xB8\x2A\x2A\x2A\x2A\xEB\x2A\xA1\x2A\x2A\x2A\x2A\x8B\x40\x2A\x85\xC0\x75\x2A\xB8\x2A\x2A\x2A\x2A\x8B\x2A\x2A\x2A\x2A\x2A\x8B\x11\x50\x8B\x2A\x2A\xFF\xD0\x85\xC0\x74\x2A\x6A\x00\x68\x2A\x2A\x2A\x2A\x8B\xC8\xE8\x2A\x2A\x2A\x2A\x85\xC0\xB8"
                /*  F7 05 ? ? ? ? ? ? ? ? 74 ? B8 ? ? ? ? EB ? A1 ? ? ? ? 8B 40 ? 85 C0 75 ? B8 ? ? ? ? 8B ? ? ? ? ? 8B 11 50 8B ? ? FF D0 85 C0 74 ? 6A 00 68 ? ? ? ? 8B C8 E8 ? ? ? ? 85 C0 B8 */
            
}
            
            
/*
            * Total Number of Players Supported (Steam Group/Lobby)
            * Currently disabled - SourceMod unable to look up other libraries.
            *
                "GetTotalNumPlayersSupported"
                {
                    "library"       "matchmaking_ds"
                    "linux"         "@_ZN11CMatchTitle27GetTotalNumPlayersSupportedEv"
                }
            */
            
            /* CServerGameClients::GetPlayerLimits(int& , int&, int&)
            *  Sig is still broken, cannot find in Windows
            */
            
"GetPlayerLimits"
            
{
                
"library"    "server"
                "linux"        "@_ZNK18CServerGameClients15GetPlayerLimitsERiS0_S0_"
//                "windows"    "\x8B\x44\x24\x04\x8B\x4C\x24\x08\xC7\x00\x2A\x2A\x2A\x2A\xC7\x01\x2A\x2A\x2A\x2A\x8B\x10"
                    /* 8B 44 24 04 8B 4C 24 08 C7 00 ? ? ? ? C7 01 ? ? ? ? 8B 10 */
            
}
            
            
/*
            * int CBaseServer::GetMasterServerPlayerCounts(int &, int &, int &)
            * 
            * Used to override server browser maxplayers reporting (Windows)
            * Search for string: "increased_maxplayers", call is just before the string
            */
            
"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 jz between "#Valve_Reject_Server_Full" and "#Valve_Reject_Bad_Password" in Windows
                 * On Linux, this points directy at the cmp for "#Valve_Reject_Server_Full" instead of the jz for the lobby
                 * For 2.1.2.5 this offset was ebx+17Ch on Linux and esi+180h on Windows */
                
"library"    "engine"
                "linux"        "\x3B\xB3\x2A\x2A\x2A\x2A\x0F\x8E\x2A\x2A\x2A\x2A\x8B\x03\xC7\x44\x24\x08\x2A\x2A\x2A\x2A\x89"
                
/* 3B B3 ? ? ? ? 0F 8E ? ? ? ? 8B 03 C7 44 24 08 ? ? ? ? 89 */

                
"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
               
               jl just before 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"
//                "linux"        "\x7E\x2A\x8B\x2A\x2A\x89\x2A\x2A\x2A\x8B\x2A\x2A\x89\x2A\x2A\x2A\x8B\x2A\x2A\x89\x2A\x2A\x2A\x8B\x2A\x2A\x89\x2A\x2A\x2A\x8B\x2A\x2A\x89\x2A\x2A\x2A\x8B\x2A\x2A"
                /* linux: 7E ? 8B ? ? 89 ? ? ? 8B ? ? 89 ? ? ? 8B ? ? 89 ? ? ? 8B ? ? 89 ? ? ? 8B ? ? 89 ? ? ? 8B ? ? */
                
"windows" "\x7C\x2A\x8B\x4D\x2A\x8B\x55\x2A\x50\x57\x68"
                
/* windows: 7C ? 8B 4D ? 8B 55 ? 50 57 68 */            

__________________
Spirit_12 is offline
ilham92-cc-sakura
Senior Member
Join Date: Oct 2008
Location: /var/www/index.html
Old 06-20-2018 , 01:50   Re: [EXTENSION] Left 4 Downtown 2 (0.5.4.2) - L4D2 Only, Updated Left4Downtown
Reply With Quote #968

Quote:
Originally Posted by Spirit_12 View Post
Player slots has been broken for Windows for a long while. Game Data needs to be updated as you can read in this section.
I use Linux, and compile under Ubuntu 14.04.5 against GCC4.8.

Currently using L4DToolz + Left4Downtown2 (no player slots).
If can ditch L4DToolz to smooth out server performance
__________________

Last edited by ilham92-cc-sakura; 06-20-2018 at 01:50.
ilham92-cc-sakura is offline
Spirit_12
Veteran Member
Join Date: Dec 2012
Location: Toronto, CA
Old 06-20-2018 , 09:02   Re: [EXTENSION] Left 4 Downtown 2 (0.5.4.2) - L4D2 Only, Updated Left4Downtown
Reply With Quote #969

Quote:
Originally Posted by ilham92-cc-sakura View Post
If can ditch L4DToolz to smooth out server performance
Didn’t quite understand that. L4DToolz is rock solid when it comes to stability. Why do you plan to move away from it? Downtown’s playerslots fix is not even supported anymore.
__________________
Spirit_12 is offline
ilham92-cc-sakura
Senior Member
Join Date: Oct 2008
Location: /var/www/index.html
Old 06-20-2018 , 09:39   Re: [EXTENSION] Left 4 Downtown 2 (0.5.4.2) - L4D2 Only, Updated Left4Downtown
Reply With Quote #970

Quote:
Originally Posted by Spirit_12 View Post
Didn’t quite understand that. L4DToolz is rock solid when it comes to stability. Why do you plan to move away from it? Downtown’s playerslots fix is not even supported anymore.
if like that, I use Left4Downtown2 no playerslots + L4DToolz
I need Left4Downtown2 for native calls
__________________
ilham92-cc-sakura is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:07.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode