r1ch.net forums
* Home Help Search Login Register
r1ch.net  |  r1ch.net stuff  |  R1Q2  |  Topic: Question about a possible restart command.
Pages: [1]
Print
Author Topic: Question about a possible restart command.  (Read 4665 times)
Weasel
Member

Posts: 85



« on: December 08, 2004, 11:24:52 am »

Quake I used to have a restart command that would restart the current map, set all scores to 0.

Is it possible to have that command in r1q2?
Logged
R1CH
Administrator
Member

Posts: 2625



« Reply #1 on: December 08, 2004, 11:34:09 am »

Things like scores and other gameplay information are stored privately by the Game DLL - such a command would need to be implemented by whichever mod was running. The closest you could get in Q2 from the server binary would be to simply restart the map on the same level - the command 'gamemap $mapname' will do this.
Logged
Weasel
Member

Posts: 85



« Reply #2 on: December 09, 2004, 01:43:31 am »

Alright, I tried that, but I find that gamemap doesn't reset scores in the mod I am using, and map resets the scores but does a hard disconnect and reconnect to the clients which causes a lot of people to not be able to reconnect.  Hrmm
Logged
Weasel
Member

Posts: 85



« Reply #3 on: December 09, 2004, 02:32:48 am »

I hate to reply to a reply, but I found that if you set sv_recycle to 1 and then do a gamemap, the scores reset, BUT sv_recycle then sets itself back to 0 so every other gamemap command, the scores do not change.
Logged
R1CH
Administrator
Member

Posts: 2625



« Reply #4 on: December 09, 2004, 09:49:51 am »

sv_recycle essentially unloads and reloads the Game DLL in between map changes for the ability to update the DLL without restarting the whole server. You can achieve the same using the 'map' command, set sv_allow_map 1 and use "map $mapname" to restart the level with a full DLL reload.
Logged
Weasel
Member

Posts: 85



« Reply #5 on: December 09, 2004, 10:48:50 am »

Right I understand that, but if I set sv_recycle in my server.cfg file, it only reloads the dll once, and then sets sv_recycle back to 0.

Gamemap is awesome because it doesn't boot every person from the server, change the map, and then make everyone reconnect like  using map.  

So if sv_recycle could be a permanent cvar that would solve my problem.  I could use gamemap, which uses a graceful and soft map change, AND the scores would reset.  

I don't understant why sv_recycle doesn't stay set if it's in the server.cfg file.  If it reloaded the dll, it surely should have re-read the server.cfg file and that cvar should stay at what it's set in the cfg file.
Logged
R1CH
Administrator
Member

Posts: 2625



« Reply #6 on: December 09, 2004, 10:59:10 am »

sv_recycle is used for reloading the game DLL in the same way the "map" command does, but as a one time use. For example, I work on the Gloom gamei386.so file, upload a new copy to the server, set sv_recycle 1 and know that at the end of the current map, the new version will be running without having the whole server shutting down.

For me at least, sv_recycle still causes all the clients to drop and reconnect, using "map" should be no different as essentially sv_recycle changes the end of level "gamemap" into "map".

What mod are you running? Surely starting a new level should reset scores, if not, check the documentation for the mod, perhaps there is some cvar you can use? I suppose I could add sv_recycle 2 which would not lose it's value when the game reloads, but I really don't see how it would be any different from using "map"...
Logged
Weasel
Member

Posts: 85



« Reply #7 on: December 09, 2004, 11:10:40 am »

Well it's probably a bug in the mod, it is TMG Railwarz which is done  by Greider.  So far I am noticing that using map, does a hard reset, and reloads the server.cfg file and resets the uptime to 0, but if you use sv_recycle, it reloads the the dll, resets the scores on the map and doesn't affect the uptime.

Who knows, but this is what I am finding in my tests.
Logged
Pages: [1]
Print
r1ch.net  |  r1ch.net stuff  |  R1Q2  |  Topic: Question about a possible restart command.
Jump to:  

Powered by SMF 1.1.19 | SMF © 2013, Simple Machines