[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4871: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4873: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4874: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4875: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
Battlefield 1942 Mods, Modding Tutorials. Forums and Mod Downloads. • View topic - Stop server from restarting map when second player joins?

Stop server from restarting map when second player joins?

Stop server from restarting map when second player joins?

Postby jrivett » Sat May 19, 2012 3:54 pm

I'm not sure why the BF42 developers set it up this way, but when the second player joins a server, the running map is restarted. The first player loses their score to that point. It doesn't do this when the first player joins, or when the third or any additional players join. It also doesn't do it when there was more than one player, all but one of them dropped out, then a second player joins in (all on the same map). This behaviour is a constant source of annoyance on my server. I've searched everywhere for a way to fix this, but found nothing.

I've started looking at the server code with the tools recommended elsewhere here (OllyDbg, IDA Pro). I've done assembly programming, but it was a while ago on a much less complex processor (6502). But I think I know what I'm looking for: a comparison of the number of players with 2, and a subsequent jump if the comparison is true. So I'll keep slogging away.

But just in case any of you serious assembly coders out there is interested in solving this problem, I figured I'd post this. Any takers?
User avatar
jrivett
 
Posts: 16
Joined: Sat Nov 26, 2011 8:03 pm
Location: Vancouver, Canada

Re: Stop server from restarting map when second player joins

Postby tuia » Sun May 20, 2012 10:20 pm

I'll have a look at the server code. No guarantees i'll find the right addresses. :)
You can create a dummy client to overcome that problem.
tuia
 
Posts: 129
Joined: Tue Sep 06, 2011 12:36 pm
Location: Lisbon, Portugal

Re: Stop server from restarting map when second player joins

Postby jrivett » Sun May 20, 2012 11:01 pm

User avatar
jrivett
 
Posts: 16
Joined: Sat Nov 26, 2011 8:03 pm
Location: Vancouver, Canada

Re: Stop server from restarting map when second player joins

Postby tuia » Sun May 20, 2012 11:42 pm

I haven't tried to create a dummy client before. One possible idea is to run a BF1942 executable shortcut with the following arguments "+restart 1 +joinServer XXX.XXX.XXX.XXX:14567" in another spare computer on your local network, where XXX.XXX.XXX.XXX is the local IP address of your dedicated server. It's a waste of computer resources, running a client, just to make numbers. There may be other ways, I don't know.
tuia
 
Posts: 129
Joined: Tue Sep 06, 2011 12:36 pm
Location: Lisbon, Portugal

Re: Stop server from restarting map when second player joins

Postby freddy » Thu May 24, 2012 9:05 am

User avatar
freddy
 
Posts: 1247
Joined: Sun Oct 18, 2009 4:58 pm

Re: Stop server from restarting map when second player joins

Postby jrivett » Thu May 24, 2012 1:58 pm

User avatar
jrivett
 
Posts: 16
Joined: Sat Nov 26, 2011 8:03 pm
Location: Vancouver, Canada

Re: Stop server from restarting map when second player joins

Postby freddy » Thu May 24, 2012 2:27 pm

User avatar
freddy
 
Posts: 1247
Joined: Sun Oct 18, 2009 4:58 pm

Re: Stop server from restarting map when second player joins

Postby jrivett » Thu May 24, 2012 5:36 pm

User avatar
jrivett
 
Posts: 16
Joined: Sat Nov 26, 2011 8:03 pm
Location: Vancouver, Canada

Re: Stop server from restarting map when second player joins

Postby tuia » Thu May 24, 2012 6:38 pm

I've managed to find what to change in the server executable (BF1942_w32ded.exe v1.61), so the map doesn't restart when a 2nd player joins. You'll need to change byte value at address 0x0047821C (offset 0x0007821C) from 75 to EB. This change makes the server believe it has already restarted the map. Please, test it thoroughly. I'm positive it works fine.
The solution that freddy suggested works, if you have the server executable patched to authorize some commands. I can tell you what you need to edit in the server executable, to accept commands unauthorized. It's only one byte change as this one.
tuia
 
Posts: 129
Joined: Tue Sep 06, 2011 12:36 pm
Location: Lisbon, Portugal

Re: Stop server from restarting map when second player joins

Postby jrivett » Thu May 24, 2012 8:59 pm

User avatar
jrivett
 
Posts: 16
Joined: Sat Nov 26, 2011 8:03 pm
Location: Vancouver, Canada

Next

Return to Battlefield server and client

Who is online

Users browsing this forum: No registered users and 13 guests