Hi all,
Since you managed to hex edit the COD2 binaries, is it possible for you to have a look at COD2 1.0 binaries? Maybe you can crack it so it will have the same download speed as 1.2 and 1.3.
Printable View
Hi all,
Since you managed to hex edit the COD2 binaries, is it possible for you to have a look at COD2 1.0 binaries? Maybe you can crack it so it will have the same download speed as 1.2 and 1.3.
Adding www download to 1.0 is not possible, because it also requires changes in the client.
PHP Code:
// based on the rate, how many bytes can we fit in the snapMsec time of the client
// normal rate / snapshotMsec calculation
rate = cl->rate;
if ( sv_maxRate->integer ) {
if ( sv_maxRate->integer < 1000 ) {
Cvar_Set( "sv_MaxRate", "1000" );
}
if ( sv_maxRate->integer < rate ) {
rate = sv_maxRate->integer;
}
}
But is it possible? For example my server have this fixed binary and I have it. It's not a big deal if not all players have it. It will just save some time for people who have this fixed binary
Could you give it a try please? And how to change to maxclients 128?
You change it by editing the hex 40 (64) to 80 (128) at offset 4BBAE (1.3).
pseudocode:
But the more clients you have the faster you will reach limits. (like visible ents limit according to IzNoGod)PHP Code:
dword_849F74C = sub_80B403A((int)"sv_maxclients", (char *)20, 1, 64, 4133u);
Attachment 651
That is correct. The engine basically assigns a hunk of memory to each player slot - note that: the player slot, not the player. Even though you may not have a full server (you may only have 1 on), the game still assigns this hunk of memory to the slot when it compiles the game, so that it can cater for all players if and when they actually join. This means that if your player numbers exceed what the game can handle in terms of memory and limits, it will crash the server even though there may be 1 or even no one online at the time. The engine will know it can't handle the full quota of players.Quote:
But the more clients you have the faster you will reach limits. (like visible ents limit according to IzNoGod)
This is why if you have hit a limit, such as max script varibles, or server commands, reducing your player slots can sometimes help. Particularly with COD4, if you keep your player slots down to below 20, you can cram more into your mods. However, if you go over 22 players, a lot of mods around today for COD4 crash servers because of limits. The Openwarfare mod - one that I am actively involved with - is notorious for crashing out at anything above 26 players. Keeping the number down to below 22 or even 20 allows us to put more into the mod.
Can you make SS of your HEX editor? Because Im very new and Im not sure if I do it correctly :/
Perhaps Mitch can write an LPatch file to be used with the ever-so easy to use LPatcher program? Then all you would have to do is run the LPatcher program, load-up the file and it will automatically update your executable.
Increasing the blocks per snap won't work. It will give this error:Code:if (!rate) {
blockspersnap = 1;
} else {
blockspersnap = ( (rate * cl->snapshotMsec) / 1000 + MAX_DOWNLOAD_BLKSIZE ) /
MAX_DOWNLOAD_BLKSIZE;
}
if (blockspersnap < 0)
blockspersnap = 1;
while (blockspersnap--) {
I changed the first MAX_DOWNLOAD_BLKSIZE from 2048 to 36864. (gonna test now if it works on 4096)Quote:
ERROR: Netchan_Transmit: length = 18531
Edit: a higher value doesn't improve your download speed.
in IDA you search for sv_maxRate. When the search is done you will find something like this:
Attachment 654
The 40h says that the max value of sv_maxclients is 64.
Now switch to hex view and click on the 40. Now you will see the offset at the left bottom in IDA:
Attachment 655
In your hex editor go to the offset and change the 40 into 80.
Attachment 652
Attachment 653
(the offset in the screenshots is for 1.0)
And for Windows version?
With Windows I cant find it:/
Moving on from sv_maxclients...
I'v noticed on some 1.0 servers the download speed is 20kbps (Highest I'v ever seen my server go is 12kbps).
Could anyone shed any light on how this was done?
I'm pretty sure its not lag-related because the server which gives me 20kbps has 350 ping yet local servers with 50 ping will only do 12kbps.
Downloading almost twice as fast can make a big difference.
Never tried it, but I would play around with the network cvars of client/server like sv_maxRate and cl_maxPackets etc.
Keep in mind that the reason these rates are so low is because it could lagg your server / ingame players when some player is downloading a file.
What have you set in your client as connection under multiplayer options?
It should say LAN/Cable/DSL. This means that the dvar 'rate' is set to 25000 instead of 5000.
Information about how to calculate your required sv_maxRate: http://www.fpsadmin.com/forum/showthread.php?t=9016
Example: 1 * 25000 * 8 = 200000 = 200 kbps = 20 kilobytes/s
How to change the maximum number of players in 1.3 v (linux)?
128 max slots ?
You should read this post by Tally:
http://killtube.org/showthread.php?1...ull=1#post9210
COD2 isn't build for having more than 64 players. Running a server with 65 or more players will be very laggy and buggy or will just crash.
Hi, sry for the late post but i wasn't sure if its stable enough. I was able to push the download speed to 19 kb/s by reversing the entire download function and forcing some values in it. I tried everything but it seems like having the download above 19 kb/s is not possible.
It's in my libcod repo, there's been 4 commits so far related to this function:
https://github.com/voron00/libcod/co...234fd7f6c997d5
https://github.com/voron00/libcod/co...cb8f3baf5100b9
https://github.com/voron00/libcod/co...2ee8ea3f6fcedf
https://github.com/voron00/libcod/co...8f3d5bacd2b329
I've been running this for nearly 3 mouths and it seems fine. :) GL.