|
Re: Server.dat patch [message #443574 is a reply to message #443566] |
Sat, 05 February 2011 13:48 |
|
cAmpa
Messages: 597 Registered: March 2006
Karma: 0
|
Colonel |
|
|
RR fixed it too.
You can choose there:
Quote: |
emptyTeamBehaviour = 'ignore'; // sets what will happen if one team runs out of players:
// 'default' - default Renegade behavior: the game is paused
// 'ignore' - the game can be played as if there are players on both teams (choose this for co-op)
// 'interrupt' - the game will be interrupted (no damage allowed, but anything else can be done)
|
Bückstabü!
|
|
|
|
|
|
|
Re: Server.dat patch [message #443685 is a reply to message #443566] |
Tue, 08 February 2011 10:04 |
|
jnz
Messages: 3396 Registered: July 2006 Location: 30th century
Karma: 0
|
General (3 Stars) |
|
|
Backup 6 bytes at 3 addresses: 0x474CF0, 0x4616A0, 0x0472c95
To pause,
Write {0xB8, 0x00, 0x00, 0x00, 0x00, 0xC3} at 0x474CF0
Write {0xB8, 0x00, 0x00, 0x00, 0x00, 0xC3} at 0x4616A0
Write {0x90, 0x90, 0x90, 0x90, 0x90, 0x90} at 0x0472c95
To resume, just restore the backed up bytes.
If you are using the LuaPlugin, the following code should work:
function Pause_Game()
Stop_Game_Tmp = MemoryRead(0x474CF0, 6)
NoGameover_Tmp = MemoryRead(0x4616A0, 6)
Pause_Tmp = MemoryRead(0x0472c95, 6)
MemoryWrite(0x474CF0, {0xB8, 0x00, 0x00, 0x00, 0x00, 0xC3})
MemoryWrite(0x4616A0, {0xB8, 0x00, 0x00, 0x00, 0x00, 0xC3})
MemoryWrite(0x0472c95, {0x90, 0x90, 0x90, 0x90, 0x90, 0x90})
end
function Resume()
if NoGameover_Tmp == nil or Stop_Game_Tmp == nil or Pause_Tmp == nil then
return
end
MemoryWrite(0x474CF0, Stop_Game_Tmp)
MemoryWrite(0x4616A0, NoGameover_Tmp)
MemoryWrite(0x0472c95, Pause_Tmp)
end
|
|
|
Re: Server.dat patch [message #443705 is a reply to message #443685] |
Tue, 08 February 2011 19:56 |
PsuFan
Messages: 441 Registered: February 2007
Karma: 0
|
Commander |
|
|
lmao, Dan your amazing. I thought you died! I haven't seen you on msn in a month. lol.
I havent tried it yet, ill let you know how it goes.
Edit:
Doesnt work so well, players cant join when paused and server games over on resume. Know any ways to fix this? The main reason I need this is because the server uses 50-80% cpu when no one is in the server. It would help greatly if I could pause it effectively. Check out this pic on pause, looks extremely promising.
-
Attachment: CPU.png
(Size: 20.56KB, Downloaded 581 times)
FDS | Scripts.dll | SSGM | BIATCH | Night Regulator | NR Plugin | BRenBot | BR Plugins | Tool Manager
[Updated on: Tue, 08 February 2011 20:19] Report message to a moderator
|
|
|
Re: Server.dat patch [message #443726 is a reply to message #443566] |
Wed, 09 February 2011 16:12 |
snazy2000
Messages: 67 Registered: December 2007
Karma: 0
|
Recruit |
|
|
Take a look at the PreJoin hook in YaRR. You could add the Resume Code in there. That should let players be able to join?? Maybe wrong but should work.
|
|
|
|
|
|
Re: Server.dat patch [message #443757 is a reply to message #443566] |
Thu, 10 February 2011 21:47 |
PsuFan
Messages: 441 Registered: February 2007
Karma: 0
|
Commander |
|
|
I tried setting the SFPS, it works decent, not anywhere close to gameplay pending, only about 30% CPU reduction (edit), it still runs around 45+, but Ill take what I can get, Im going to fry this fan running 24/7.
I can only set the sfps to 10, anything lower prevents joins, console commands, and crashes clients.
I tried looking for the prejoin in yarr, lmao, doesnt look easy to replicated in luaplugin with my C++ skills.
FDS | Scripts.dll | SSGM | BIATCH | Night Regulator | NR Plugin | BRenBot | BR Plugins | Tool Manager
[Updated on: Thu, 10 February 2011 22:01] Report message to a moderator
|
|
|
|
|
Re: Server.dat patch [message #443771 is a reply to message #443765] |
Fri, 11 February 2011 16:44 |
PsuFan
Messages: 441 Registered: February 2007
Karma: 0
|
Commander |
|
|
snazy2000 wrote on Fri, 11 February 2011 12:08 | Try and convert your LUA to c++??
|
It would be easier to just copy the c++ prejoin to luaplugin c++ and call lua, if I knew how, rather than relearning c++ and converting thousands of lines of code. It's not worth it. That method won't work 100% anyway, the server won't be able to reload the game while the player is in the game channel pushing the star button to join the game. They will most likely need to rejoin or load the level twice. Maybe I need a client connector to start the server before joining.
FDS | Scripts.dll | SSGM | BIATCH | Night Regulator | NR Plugin | BRenBot | BR Plugins | Tool Manager
|
|
|
Re: Server.dat patch [message #443789 is a reply to message #443566] |
Sat, 12 February 2011 12:45 |
|
jnz
Messages: 3396 Registered: July 2006 Location: 30th century
Karma: 0
|
General (3 Stars) |
|
|
As far as I can remember from testing the pause resume code, the game didn't end when it was paused an resumed when no one was in game. I should test it and maybe offer a potential fix. Can't make any promises though as I struggle to get on a computer for more than a couple of hours a week now. When this time last year is was 4 hours+ a day!
[Updated on: Sat, 12 February 2011 12:45] Report message to a moderator
|
|
|
Re: Server.dat patch [message #443854 is a reply to message #443566] |
Tue, 15 February 2011 01:51 |
abraham111
Messages: 2 Registered: February 2011
Karma: 0
|
Recruit |
|
|
I am little bit disappointed that nothing is mentioned about a better server.dat patch. I am going to try the method mentioned by jnZ. But I am little bit skeptical about the code. I really wonder whether it will work. Anyway I have decided to give it a try. I will soon let everybody know how it went.
"ALL IS WELL"
|
|
|
|