Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server map rotation fails after a while #262

Closed
ostrich opened this issue Jan 22, 2024 · 8 comments
Closed

Server map rotation fails after a while #262

ostrich opened this issue Jan 22, 2024 · 8 comments

Comments

@ostrich
Copy link

ostrich commented Jan 22, 2024

I'm running a server with quake3e.ded. I have a map rotation set up. After some period of time, nextmap becomes set to map_restart 0 and the maps stop rotating. This is similar to #203, but I'm running vanilla Quake 3.

Here's my maps.cfg which I load from the command line with +exec maps.cfg:

set d1 "map q3dm6 ; set nextmap vstr d2"
set d2 "map q3dm7 ; set nextmap vstr d3"
set d3 "map q3dm13 ; set nextmap vstr d4"
set d4 "map q3dm17 ; set nextmap vstr d5"
set d5 "map q3tourney2 ; set nextmap vstr d1"

vstr d1

At server launch, nextmap is correctly set to vstr d2. Here's nextmap after the server has been running for some long period of time (not sure how long precisely):

]nextmap
"nextmap" is:"map_restart 0^7" default:"^7"
@ensiform
Copy link
Contributor

ensiform commented Jan 23, 2024

Did it stay on a map for multiple days? Without change? You might also not have sv_levelTimeReset set.

I am not entirely sure if it is the best idea to preserve the value of nextmap cvar upon forced restart on extreme long uptime or even the slightly less extreme long uptime either. There may be some corner case issues where setting it to the old value could break other mods, they would need to be tested and investigated if it is safe to do so.

Related:
https://github.com/ec-/Quake3e/blob/master/code/server/sv_main.c#L1337-L1355

https://github.com/ec-/Quake3e/blob/master/code/server/sv_main.c#L1249-L1274

@ostrich
Copy link
Author

ostrich commented Jan 23, 2024

The server can stay up without a map change for multiple days, though not typically 23 as mentioned in the first link. However, I've observed the problem even with clients on the server reaching fraglimit. I have timelimit set to 0. The map rotation will work fine for several maps as players reach fraglimit and will then begin to restart the same map over and over as nextmap somehow becomes set to map_restart 0.

I'll try setting sv_levelTimeReset and see if that helps.

@ensiform
Copy link
Contributor

Have you considered using the ec-/baseq3a mod? It has fixes plus also a replacement system for map rotation iirc.

@ostrich
Copy link
Author

ostrich commented Jan 23, 2024

Oh nice, I will look into it. Thanks.

@ec-
Copy link
Owner

ec- commented Jan 23, 2024

I wouldn't bother supporting vanilla q3 qvms for anything other than 'authenticity' as it has a LOT of bugs and unpatched vulnerabilities, consider using baseq3a mod with dedicated rotation system

@Chomenor
Copy link
Contributor

To be clear, isn't vanilla qvm support important for mod compatibility? Mods based on the vanilla game may not implement every patch but it's still useful for the engine to support them as well as possible.

@Chomenor
Copy link
Contributor

From what I can tell, this looks like a valid engine bug. In quake3e, SV_Restart is invoked automatically due to time overflow conditions, which calls the map console command, which calls SV_SpawnServer, which resets the nextmap cvar and breaks the rotation. In vanilla q3, it looks like the reset is done via vstr nextmap instead which allows the rotation to update nextmap and preserve itself.

I'd suggest that SV_Restart should not alter the nextmap cvar. Additionally, if there is any compatibility reason to keep the nextmap reset in SV_SpawnServer at all, it would probably be good if there was at least a cvar option to disable it to allow a setup where a standard rcon map command doesn't automatically break the rotation.

@Chomenor
Copy link
Contributor

For reference, it looks like cnq3 does not reset or touch nextmap at all.

@ec- ec- closed this as not planned Won't fix, can't repro, duplicate, stale Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants