View Full Version : Ive always really wondered this
plunK
Aug 14, 2009, 07:00 PM
For level hosting: the number of players select:
so for example, you type in 268, it ends up being 12 (268-256), or lets say you type in 137, it displays -119 (137-256). This extends from 128 to 288 displaying -128 to 32. But my question is why? why is this feature even existant?
EvilMike
Aug 14, 2009, 09:32 PM
I'm not sure what you're talking about. If I try to enter a number above 32, it just sets it to 32.
Also, what does this have to do with JCS? I'm moving this thread to General in the mean time, since it seems more on topic there (and will get more views).
DarkB
Aug 16, 2009, 03:24 AM
More than 32 players you can't enter.
Well u can but only if you hex edit or so..but the number of players that can enter in server will remain 32.(this is to show how great hacker u are:lol:)
blurredd
Aug 16, 2009, 10:02 AM
It's because JJ2 does this:
static char maxPlayers = 0;
char c = getchar();
if (c >= '0' && c <= '9') {
maxPlayers = maxPlayers * 10; //loss of data since char is too small
maxPlayers += c - '0';
if (maxPlayers > 32) {
maxPlayers = 32;
}
}
When it should be doing something like this:
static char maxPlayers = 0;
char c = getchar();
if (c >= '0' && c <= '9') {
int tempMaxPlayers = maxPlayers * 10;
tempMaxPlayers += c - '0';
if (tempMaxPlayers > 32) {
tempMaxPlayers = 32;
}
maxPlayers = tempMaxPlayers;
}
plunK
Aug 16, 2009, 07:13 PM
that makes sense...and evilmike, you cannot enter anything above 32, but if you enter other things you can end up with numbers down to -128(ill get a pic), and no editing or modding at all
DarkB
Aug 17, 2009, 02:39 AM
Here it is:
http://img269.imageshack.us/img269/2391/abug.png
It seems when enter a number higher than 128 it goes to minus.
vBulletin® v3.8.2, Copyright ©2000-2025, Jelsoft Enterprises Ltd.