This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Is 30 slots the max?


Post New Thread Reply   
 
Thread Tools Display Modes
Zephyrus
Cool Pig B)
Join Date: Jun 2010
Location: Hungary
Old 09-21-2012 , 09:51   Re: Is 30 slots the max?
Reply With Quote #21

Quote:
Originally Posted by psychonic View Post
This should remove the 32 cap, assuming that you've added more spawns to get past the 30 cap.

I haven't fully tested as I don't have time at the moment to mess around with spawns. If it works, I'll compile for linux later.

It's a VSP so you'll need to add a vdf in the addons dir, similar to metamod's.
ive only disassembled it but as far as i remember i tried your method and it wont work
__________________
Taking private C++/PHP/SourcePawn requests, PM me.
Zephyrus is offline
psychonic

BAFFLED
Join Date: May 2008
Old 09-21-2012 , 10:13   Re: Is 30 slots the max?
Reply With Quote #22

Quote:
Originally Posted by Zephyrus View Post
ive only disassembled it
You could have just asked. I'm not going to hide information like you are.

I just hooked IServerGameClients::GetPlayerLimits. Debugging with a watch on the max clients showed that it was changing in CGameServer::InitMaxClients twice, one of the times presumably after the GetPlayerLimits call.

This makes sense as while GPL says that the max is 64, is has the default as 32, and the default gets used due to -maxplayers no longer being read. If this isn't the only place it's getting reset, I'll just debug it further. The only other place I foresee it getting reset is in ReplyReservationRequest when it sets it to the numSlots told to it by the lobby, after which it can just be reverted.

Last edited by psychonic; 09-21-2012 at 10:13.
psychonic is offline
Zephyrus
Cool Pig B)
Join Date: Jun 2010
Location: Hungary
Old 09-21-2012 , 10:26   Re: Is 30 slots the max?
Reply With Quote #23

Quote:
Originally Posted by psychonic View Post
You could have just asked. I'm not going to hide information like you are.

I just hooked IServerGameClients::GetPlayerLimits. Debugging with a watch on the max clients showed that it was changing in CGameServer::InitMaxClients twice, one of the times presumably after the GetPlayerLimits call.

This makes sense as while GPL says that the max is 64, is has the default as 32, and the default gets used due to -maxplayers no longer being read. If this isn't the only place it's getting reset, I'll just debug it further. The only other place I foresee it getting reset is in ReplyReservationRequest when it sets it to the numSlots told to it by the lobby, after which it can just be reverted.
there are quite a few coders ive told about how i did it, one of them was databomb, and btw you wanna use SetMaxClients instead of InitMaxClients
__________________
Taking private C++/PHP/SourcePawn requests, PM me.
Zephyrus is offline
psychonic

BAFFLED
Join Date: May 2008
Old 09-21-2012 , 10:29   Re: Is 30 slots the max?
Reply With Quote #24

Quote:
Originally Posted by Zephyrus View Post
there are quite a few coders ive told about how i did it, one of them was databomb, and btw you wanna use SetMaxClients instead of InitMaxClients
I realize that just calling SetMaxClients with a higher number sometime after start will probably work, but I would rather identify why that is being called with 32 to block it at the source or have a deterministic place to set it back.

Last edited by psychonic; 09-21-2012 at 10:32.
psychonic is offline
Zephyrus
Cool Pig B)
Join Date: Jun 2010
Location: Hungary
Old 09-21-2012 , 10:35   Re: Is 30 slots the max?
Reply With Quote #25

Quote:
Originally Posted by psychonic View Post
I realize that just calling SetMaxClients with a higher number sometime after start will probably work, but I would rather identify why that is being called with 32 and have a deterministic place to set it back.
i didnt mess with it because by the time your hook gets called (if it gets called at all?) its already too late, if you check the srcds output its like the second or third line that says "maxplayers set to 32"
__________________
Taking private C++/PHP/SourcePawn requests, PM me.
Zephyrus is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 09-21-2012 , 10:42  
Reply With Quote #26

Quote:
Originally Posted by Zephyrus View Post
i didnt mess with it because by the time your hook gets called (if it gets called at all?) its already too late, if you check the srcds output its like the second or third line that says "maxplayers set to 32"
Hence why it's a VSP not a MM:S plugin nor SM extension.
__________________
asherkin is offline
psychonic

BAFFLED
Join Date: May 2008
Old 09-21-2012 , 10:47   Re: Is 30 slots the max?
Reply With Quote #27

Quote:
Originally Posted by Zephyrus View Post
i didnt mess with it because by the time your hook gets called (if it gets called at all?) its already too late, if you check the srcds output its like the second or third line that says "maxplayers set to 32"
I disagree.

The function certainly gets called and does so before the printed "maxplayers set to 32".


Breakpoint 3, CGameServer::InitMaxClients (this=<value optimized out>)
at /home/buildbot/buildslave_hpath/csgo_pcbeta_linux/build/src/engine/./sv_main.cpp:776
776 /home/buildbot/buildslave_hpath/csgo_pcbeta_linux/build/src/engine/./sv_main.cpp: No such file or directory.
in /home/buildbot/buildslave_hpath/csgo_pcbeta_linux/build/src/engine/./sv_main.cpp
(gdb) c
Continuing.

Breakpoint 5, CServerGameClients::GetPlayerLimits (this=0xb3842d38, minplayers=@0xbfffd1fc, maxplayers=@0xbfffd1f8, defaultMaxPlayers=@0xbfffd1f4)
at /home/buildbot/buildslave_hpath/csgo_pcbeta_linux/build/src/game/server/./cstrike15/cs_gameinterface.cpp:28
28 /home/buildbot/buildslave_hpath/csgo_pcbeta_linux/build/src/game/server/./cstrike15/cs_gameinterface.cpp: No such file or directory.
in /home/buildbot/buildslave_hpath/csgo_pcbeta_linux/build/src/game/server/./cstrike15/cs_gameinterface.cpp
(gdb) c
Continuing.
Hardware watchpoint 1: sv.m_nMaxClientsLimit

Old value = 0
New value = 64
CGameServer::InitMaxClients (this=<value optimized out>) at /home/buildbot/buildslave_hpath/csgo_pcbeta_linux/build/src/engine/./sv_main.cpp:818
818 /home/buildbot/buildslave_hpath/csgo_pcbeta_linux/build/src/engine/./sv_main.cpp: No such file or directory.
in /home/buildbot/buildslave_hpath/csgo_pcbeta_linux/build/src/engine/./sv_main.cpp
(gdb) c
Continuing.
Hardware watchpoint 2: sv.m_nMaxclients

Old value = 0
New value = 32
CGameServer::SetMaxClients (this=<value optimized out>) at /home/buildbot/buildslave_hpath/csgo_pcbeta_linux/build/src/engine/./sv_main.cpp:2031
2031 in /home/buildbot/buildslave_hpath/csgo_pcbeta_linux/build/src/engine/./sv_main.cpp
(gdb) c
Continuing.
maxplayers set to 32


This also supports what I said, that InitMaxClients initialized the max to 64 and then calls SetMaxClients with 32 to set the current max, after calling GetPlayerLimits, still within InitMaxClients.

Last edited by psychonic; 09-21-2012 at 10:50.
psychonic is offline
SilentBr
Veteran Member
Join Date: Jan 2009
Old 09-21-2012 , 12:12   Re: Is 30 slots the max?
Reply With Quote #28

Quote:
Originally Posted by psychonic View Post
This should remove the 32 cap, assuming that you've added more spawns to get past the 30 cap.

I haven't fully tested as I don't have time at the moment to mess around with spawns. If it works, I'll compile for linux later.

It's a VSP so you'll need to add a vdf in the addons dir, similar to metamod's.
I would love test it right now but it seems only for windows? Please do a Linux version and I test it as soon as you post.
SilentBr is offline
psychonic

BAFFLED
Join Date: May 2008
Old 09-21-2012 , 12:30   Re: Is 30 slots the max?
Reply With Quote #29

Quote:
Originally Posted by SilentBr View Post
I would love test it right now but it seems only for windows? Please do a Linux version and I test it as soon as you post.
I said in my post that I will compile it for linux later. You don't need to ask for it both in a both and PM simultaneously.
psychonic is offline
SilentBr
Veteran Member
Join Date: Jan 2009
Old 09-21-2012 , 12:41   Re: Is 30 slots the max?
Reply With Quote #30

Quote:
Originally Posted by psychonic View Post
I said in my post that I will compile it for linux later. You don't need to ask for it both in a both and PM simultaneously.
Sorry I didnt see the part that you said you was going to compile for Linux. I did send you a PM because maybe you got a forum email... Sorry again

Anyway, you dont have to wait to check if windows is woking. When you have free time please compile for linux and I will test.

I cant wait to test it in my server.

Thanks!
SilentBr 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 22:46.


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