Register FAQ Search Today's Posts Mark Forums Read
Go Back   JazzJackrabbit Community Forums » Open Forums » General Jazz Jackrabbit Talk

Ive always really wondered this

plunK

JCF Member

Joined: Apr 2008

Posts: 514

plunK is an asset to this forum

Aug 14, 2009, 07:00 PM
plunK is offline
Reply With Quote
Ive always really wondered this

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

JCF Member

Joined: Jun 2001

Posts: 3,478

EvilMike is OFF DA CHARTEvilMike is OFF DA CHARTEvilMike is OFF DA CHARTEvilMike is OFF DA CHART

Aug 14, 2009, 09:32 PM
EvilMike is offline
Reply With Quote
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

JCF Member

Joined: Jul 2008

Posts: 494

DarkB is doing well so far

Aug 16, 2009, 03:24 AM
DarkB is offline
Reply With Quote
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)
__________________

Do not dwell in the past, do not dream of the future, concentrate the mind on the present moment.
blurredd

JCF Member

Joined: Nov 2001

Posts: 1,896

blurredd is an asset to this forumblurredd is an asset to this forum

Aug 16, 2009, 10:02 AM
blurredd is offline
Reply With Quote
It's because JJ2 does this:

Code:
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:

Code:
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;
}
__________________
D3
Extra. No CTO v0.75
Animating Tiles Properties.
ATB Contest. Scripting Language.
Gameplay Theories.
1UP. Pitfall. Desolation.
SC2.

plunK

JCF Member

Joined: Apr 2008

Posts: 514

plunK is an asset to this forum

Aug 16, 2009, 07:13 PM
plunK is offline
Reply With Quote
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

JCF Member

Joined: Jul 2008

Posts: 494

DarkB is doing well so far

Aug 17, 2009, 02:39 AM
DarkB is offline
Reply With Quote
Here it is:

It seems when enter a number higher than 128 it goes to minus.
__________________

Do not dwell in the past, do not dream of the future, concentrate the mind on the present moment.
Reply

Thread Tools

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 On

Forum Jump

All times are GMT -8. The time now is 05:30 AM.