Raised This Month: $51 Target: $400
 12% 

[EXTENSION] Left 4 Downtown (0.4.6) - L4D2 is here and supported


Post New Thread Reply   
 
Thread Tools Display Modes
Apex_
Member
Join Date: Jan 2008
Old 12-09-2009 , 15:01   Re: [EXTENSION] Left 4 Downtown (0.3.1) - now with unlocked player slots
Reply With Quote #411

Quote:
Originally Posted by Riffy View Post
Still can't seem to get it to allow the 9th person in, could anyone offer some advise to me please?
Same here. I always end up with 4 player survivors and 4 AI survivors. I've tried this and l4dtoolz (MM plugin) and neither seem to make more than 8 slots usable.
Apex_ is offline
Downtown1
Veteran Member
Join Date: Mar 2004
Old 12-09-2009 , 15:41   Re: [EXTENSION] Left 4 Downtown (0.3.1) - now with unlocked player slots
Reply With Quote #412

Ahhhhh, I can't stand AT&T asm please no more .

Quote:
_ZNK16CTerrorGameRules18GetMaxHumanPlayersEv
Actually if you look at the source I believe I was already overriding this function for the server browsers.. unfortunately after a recent DLC it broke on Windows but not on Linux.

I used to override this function on Windows anyway just for fun and it turns out it was screwing up switching to scavenge.. you know how you can be on a versus map and do mp_gamemode scavenge and it would be sort of in versus, sort of in scavenge? That's exactly what was happening.

So yeah, weird platform-specific issues...

That being said I will be using a different function to change the # of players reported to server browser that works just great on Windows, no problems I can see yet.

Last edited by Downtown1; 12-10-2009 at 03:26.
Downtown1 is offline
Bigbuck
Senior Member
Join Date: Jul 2009
Old 12-09-2009 , 17:12   Re: [EXTENSION] Left 4 Downtown (0.3.1) - now with unlocked player slots
Reply With Quote #413

I'm a bit confused on the whole lobby reservation thing so if someone could help clarify that would be great. What I understand is when a server is started it is unreserved and then when a player joins it becomes reserved with a special "key". Is this what prevents more than 4 for coop and 8 for versus to join a game? What I am getting to is does the reservation need to be removed in order to have more than said number of players?

Edit:
A few more things came to mind. I can't remember if there ever was a fix for this, but setting l4d_maxplayers to anything greater than 4 causes the game to run in Versus. Downtown, you had mentioned the Windows version was going ok. I would be able to test it on both L4D/2 if you would like.

Last edited by Bigbuck; 12-09-2009 at 21:20.
Bigbuck is offline
[X]BetaAlpha
AlliedModders Donor
Join Date: Aug 2009
Old 12-10-2009 , 06:03   Re: [EXTENSION] Left 4 Downtown (0.3.1) - now with unlocked player slots
Reply With Quote #414

nowakpl,

Findings with GetPlayerLimits and patching it to 32 had mixed results with stability - generally anything above 10v10 and beyond would produce random results. The other problem I came across is that it appears this function also only gets called at server start - before any extensions are loaded, which is why it's fine with a manual hack but more awkward for a dynamic hack and also makes no sense to detour if it never gets called after startup (This to be confirmed - haven't had time to look if there is any other function that calls it at game time). I had actually tested patching this function from the extension with my own values and as you may guess - no change. Perhaps to look into a way of mapping it and recalling it may be an idea but I think it's deeper than that - GetMaxClients/SetMaxClients I believe is the route here for maxclients.

I also already did write a patch for that exact location you specified for the Steam Lobby however at present we can't use sig's contained in other files apart from server/engine .so's

Last edited by [X]BetaAlpha; 12-10-2009 at 08:35.
[X]BetaAlpha is offline
[X]BetaAlpha
AlliedModders Donor
Join Date: Aug 2009
Old 12-10-2009 , 06:33   Re: [EXTENSION] Left 4 Downtown (0.3.1) - now with unlocked player slots
Reply With Quote #415

BigBuck,

Yes the lobby reservation status (cookie) needs to be cleared before allowing more than 4 or 8 players in. At present (unless there's a lock in matchmaking) I don't think or unsure if there is a way to keep the reservation while having more than 4 or 8 but I doubt it.

The > 4 players locking to versus is a new one. I checked this and was able to have gamemode = coop and >4 players. Are you starting the game from lobby?

The original unreserve lobby script would unreserve when the server is full with lobby players, then it would unreserve (ie clear the cookie and only then) - Slots are restricted to 4/8 until this happens. (The one I included in my post just unreserves straight away - but this has been updated but not posted yet). There is also free slot issue with sv_allow_lobby_connect_only set to 1.
[X]BetaAlpha is offline
[X]BetaAlpha
AlliedModders Donor
Join Date: Aug 2009
Old 12-10-2009 , 07:25   Re: [EXTENSION] Left 4 Downtown (0.3.1) - now with unlocked player slots
Reply With Quote #416

Downtown1,

Some lovely more asm for you, Left4Dead2 MaxClients weirdness.

002bd374 <_ZN11CGameServer13SetMaxClientsEi>:

2bd392: 89 c2 mov %eax,%edx
2bd394: 0f 4d d1 cmovge %ecx,%edx
2bd397: 89 93 04 01 00 00 mov %edx,0x104(%ebx)

Remove above, replace:

2bd392: ba 20 00 00 00 mov $0x20,%edx
2bd397: 89 93 04 01 00 00 mov %edx,0x104(%ebx)

Original

#Console initialized.
#Game.dll loaded for "Left 4 Dead 2"
Server is hibernating
ConVarRef test_progression_loop doesn't point to an existing ConVar
Game supporting (2) split screen players
maxplayers set to 18
maxplayers set to 18

Patched

#Console initialized.
#Game.dll loaded for "Left 4 Dead 2"
Server is hibernating
ConVarRef test_progression_loop doesn't point to an existing ConVar
Game supporting (2) split screen players
maxplayers set to 32
maxplayers set to 18

LOL WTF? Why does it get called twice? CGameServer & CBaseServer ? or CGameServer first then GetPlayerLimits?

00752638 <_ZNK18CServerGameClients15GetPlayerLimitsERi S0_S0_>:
752638: 8b 4c 24 08 mov 0x8(%esp),%ecx
75263c: c7 01 80 00 00 00 movl $0x12,(%ecx) Replace >18 (min) with 80 here for LOL.
752642: 8b 44 24 0c mov 0xc(%esp),%eax
752646: c7 00 12 00 00 00 movl $0x12,(%eax)

#Console initialized.
#Game.dll loaded for "Left 4 Dead 2"
Server is hibernating
ConVarRef test_progression_loop doesn't point to an existing ConVar
Game supporting (2) split screen players
GetPlayerLimits: min maxplayers 128 > max 18
Add "-debug" to the ./srcds_run command line to generate a debug.log to help with solving this problem

CRASH!

And..

2bd3a7: 74 33 je 2bd3dc <_ZN11CGameServer13SetMaxClientsEi+0x68>

NOP both

Server will auto-restart if there is a crash.
#
#Console initialized.
#Game.dll loaded for "Left 4 Dead 2"
Server is hibernating
ConVarRef test_progression_loop doesn't point to an existing ConVar
Game supporting (2) split screen players
maxplayers set to 32 (extra slot was added for SourceTV)
maxplayers set to 18

LOL

Nice and easy one - replace 0x104 reference with $0xFF constant so it always returns your value.

Original:

0013c554 <_ZNK11CBaseServer13GetMaxClientsEv>:
13c554: 8b 44 24 04 mov 0x4(%esp),%eax
13c558: 8b 80 04 01 00 00 mov 0x104(%eax),%eax
13c55e: c3 ret
13c55f: 90 nop

Patched:

0013c554 <_ZNK11CBaseServer13GetMaxClientsEv>:
13c554: 8b 44 24 04 mov 0x4(%esp),%eax
13c558: b8 ff 00 00 00 mov $0xff,%eax
13c55d: c3 ret
13c55e: 90 nop
13c55f: 90 nop

L 12/10/2009 - 12:47:18: [LEFT4DOWNTOWN] Server activated with 255 maxclients

Today I'm half asleep and bored in work...

Last edited by [X]BetaAlpha; 12-10-2009 at 07:53.
[X]BetaAlpha is offline
nowakpl
Junior Member
Join Date: Jan 2009
Old 12-10-2009 , 09:47   Re: [EXTENSION] Left 4 Downtown (0.3.1) - now with unlocked player slots
Reply With Quote #417

Quote:
Originally Posted by [X]BetaAlpha View Post
0013c554 <_ZNK11CBaseServer13GetMaxClientsEv>:
13c554: 8b 44 24 04 mov 0x4(%esp),%eax
13c558: b8 ff 00 00 00 mov $0xff,%eax
13c55d: c3 ret
13c55e: 90 nop
13c55f: 90 nop

L 12/10/2009 - 12:47:18: [LEFT4DOWNTOWN] Server activated with 255 maxclients

Today I'm half asleep and bored in work...
but does that only fake the max clients or really make the server valid for more than 18 players? i.e. arrays and objects are created and initialized for more than 18 players.
nowakpl is offline
[X]BetaAlpha
AlliedModders Donor
Join Date: Aug 2009
Old 12-10-2009 , 10:22   Re: [EXTENSION] Left 4 Downtown (0.3.1) - now with unlocked player slots
Reply With Quote #418

nowakpl,

No I was just toying and unfortunately it does not, it wouldn't really make sense to do it unless you tally it up with setmaxclients - this is where it will need to happen.
[X]BetaAlpha is offline
[X]BetaAlpha
AlliedModders Donor
Join Date: Aug 2009
Old 12-10-2009 , 12:18   Re: [EXTENSION] Left 4 Downtown (0.3.1) - now with unlocked player slots
Reply With Quote #419

Well, looks like I found the magic for SetMaxClients. There was me concentrating on 0x104 and it appears the wanted reference is 0x224 (which in the original is compared as the restricted limit it appears).

Original Code Block:

002bd374 <_ZN11CGameServer13SetMaxClientsEi>:

2bd386: 39 ca cmp %ecx,%edx
2bd388: 7c 0d jl 2bd397 <_ZN11CGameServer13SetMaxClientsEi+0x23>
2bd38a: 8b 83 20 02 00 00 mov 0x220(%ebx),%eax
2bd390: 39 c1 cmp %eax,%ecx
2bd392: 89 c2 mov %eax,%edx
2bd394: 0f 4d d1 cmovge %ecx,%edx
2bd397: 89 93 04 01 00 00 mov %edx,0x104(%ebx)

But for sanity as eax is used later from 0x220, and it still expects to mov information into 0x104, I have replaced the above code block with this:

Patched Code Block:

2bd386: 8b 83 20 02 00 00 mov 0x220(%ebx),%eax
2bd38C: ba 20 00 00 00 mov $0x20,%edx
2bd391: 89 93 04 01 00 00 mov %edx,0x104(%ebx)
2bd397: 89 93 24 02 00 00 mov %edx,0x224(%ebx)

Now my limits are set to 32 no matter what, and can be changed by the $0x20 specifier. Just need a way to call it now or patch it through the extension so we can dynamically adjust $0x20.

L 12/10/2009 - 16:52:21: [LEFT4DOWNTOWN] Server activated with 32 maxclients
L 12/10/2009 - 16:52:21: [LEFT4DOWNTOWN] CVAR l4d_maxplayers changed to 32...

So far so good, lets check and connect with 16 survivor bots, then let infected bots kick in, if all is well I should not get any fakeclient errors. Update: over 21 fake clients in, plus a couple of humans - looks good.

nowakpl - Would you like to adapt this code block and test if for me? Could do with a full human test (make sure any other patches you've done like limits and that are default)

-XBetaAlpha
[X]BetaAlpha is offline
Bigbuck
Senior Member
Join Date: Jul 2009
Old 12-10-2009 , 18:43   Re: [EXTENSION] Left 4 Downtown (0.3.1) - now with unlocked player slots
Reply With Quote #420

Quote:
Originally Posted by [X]BetaAlpha View Post
BigBuck,

Yes the lobby reservation status (cookie) needs to be cleared before allowing more than 4 or 8 players in. At present (unless there's a lock in matchmaking) I don't think or unsure if there is a way to keep the reservation while having more than 4 or 8 but I doubt it.

The > 4 players locking to versus is a new one. I checked this and was able to have gamemode = coop and >4 players. Are you starting the game from lobby?

The original unreserve lobby script would unreserve when the server is full with lobby players, then it would unreserve (ie clear the cookie and only then) - Slots are restricted to 4/8 until this happens. (The one I included in my post just unreserves straight away - but this has been updated but not posted yet). There is also free slot issue with sv_allow_lobby_connect_only set to 1.
It's my own dedicated server that I connect to via the "openserverbrowser". I have not tried connecting via lobby or steam group. I tested using the unreserve plugin and instead of giving me "there are no available slots blah blah blah" it told me the server was full. I confirmed it unreserved the server before I joined so that wasn't the problem.
Bigbuck is offline
Reply



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 10:22.


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