MantisBT - Zandronum
View Issue Details
0001669Zandronum[All Projects] Suggestionpublic2014-01-16 21:072018-09-30 21:37
Qent 
Torr Samaho 
normaltweakN/A
closedfixed 
MicrosoftWindowsXP/Vista/7
1.2 
2.12.1 
0001669: Make sv_randommaprotation respect votes
Random map plays the map list in a random order and does not revisit maps until every map in the list has been played. Voting away from a map (either a map or changemap vote) does not mark a map as completed, so if there is one map in particular that the players dislike and vote down, the server will eventually have only that map remaining, and keep coming back to it until it gets played.

Instead, voting away from a map should count the same as if that map were completed by normal means.
Have a server with a few maps in random rotation and a short timelimit like 0.1 with sv_limitnumvotes false. Every time one map (say map01) comes up, vote to a different map. On the other maps, let the time expire.
No tags attached.
Issue History
2014-01-16 21:07QentNew Issue
2014-01-18 20:11HypnotoadNote Added: 0008076
2014-01-28 07:23Konar6Note Added: 0008143
2014-06-15 15:09WatermelonNote Added: 0009414
2014-06-15 15:09WatermelonStatusnew => feedback
2014-06-15 17:18HypnotoadNote Added: 0009467
2015-01-17 13:20LeonardNote Added: 0011407
2015-06-12 22:19unknownnaNote Added: 0012668
2015-06-12 22:52DuskStatusfeedback => needs review
2015-06-14 13:48Torr SamahoNote Added: 0012715
2015-06-14 13:48Torr SamahoStatusneeds review => assigned
2015-06-14 14:23unknownnaNote Added: 0012716
2015-06-14 14:56Torr SamahoNote Added: 0012717
2015-06-14 14:57Torr SamahoAssigned To => Torr Samaho
2015-06-14 14:57Torr SamahoStatusassigned => needs testing
2015-06-14 15:17unknownnaNote Added: 0012718
2015-06-14 15:19unknownnaNote Edited: 0012718bug_revision_view_page.php?bugnote_id=12718#r7437
2015-06-14 15:25unknownnaNote Edited: 0012718bug_revision_view_page.php?bugnote_id=12718#r7439
2015-06-14 15:33unknownnaNote Edited: 0012718bug_revision_view_page.php?bugnote_id=12718#r7440
2015-06-14 15:37unknownnaNote Edited: 0012718bug_revision_view_page.php?bugnote_id=12718#r7441
2015-06-14 15:53unknownnaNote Edited: 0012718bug_revision_view_page.php?bugnote_id=12718#r7442
2015-06-14 18:03Torr SamahoNote Added: 0012720
2015-06-14 18:07cobaltTarget Version => 2.1
2015-06-14 18:07cobaltDescription Updatedbug_revision_view_page.php?rev_id=7447#r7447
2015-06-14 18:07cobaltNote Added: 0012721
2015-06-14 18:11unknownnaNote Added: 0012722
2015-06-15 00:17WaTaKiDNote Added: 0012730
2015-06-15 06:14Torr SamahoNote Added: 0012731
2015-06-15 06:15Torr SamahoNote Edited: 0012731bug_revision_view_page.php?bugnote_id=12731#r7457
2015-06-15 06:22cobaltNote Added: 0012732
2015-06-15 16:24WaTaKiDNote Added: 0012733
2015-06-15 16:25WaTaKiDNote Edited: 0012733bug_revision_view_page.php?bugnote_id=12733#r7459
2015-06-24 22:45DuskStatusneeds testing => resolved
2015-06-24 22:45DuskFixed in Version => 2.2
2015-06-24 22:45DuskResolutionopen => fixed
2015-06-24 22:48DuskFixed in Version2.2 => 2.1
2015-07-06 21:44unknownnaNote Added: 0012831
2018-09-30 21:37Blzut3Statusresolved => closed

Notes
(0008076)
Hypnotoad   
2014-01-18 20:11   
In general I think the map rotation system can be much improved. If you're using a server that hosts in excess of 100 maps (e.g. jumpmaze servers) then having random maps on or off both have drawbacks. If it's off, very often very large chunks of the map rotation might be skipped because people will keep voting to change to their favorite map which may be at the end or beginning of the rotation, skipping entire wads in the process often resulting in maps never getting played. If random is on, due to voting to change to a particular map being very common the issue presented in the OP is present, with some maps repeating far too often. I'd love to see a more user orientated map rotation system, for instance with users choosing how they would like to proceed through the rotation on exit, I tried to do this with my voter mod:'https://zandronum.com/forum/showthread.php?tid=3929 [^]' however it requires a lot of work having to manually input every map lump name and its description into the script and then recompiling. ACS having access to the map rotation info would also be a very nice feature.
(0008143)
Konar6   
2014-01-28 07:23   
'https://bitbucket.org/Konar6/kpatch/commits/4b02a1a16bef5afc6c439ecf96f683a50a0f1ecf [^]'

This also fixes the problem with the first map loaded on the server startup not being random, and the problem with the first map not being marked as used, the latter which I discovered while making this patch.
(0009414)
Watermelon   
2014-06-15 15:09   
Still interested in this ticket?
(0009467)
Hypnotoad   
2014-06-15 17:18   
I am.
(0011407)
Leonard   
2015-01-17 13:20   
Made a pull request.
(0012668)
unknownna   
2015-06-12 22:19   
Yes, this is a very frequent issue on CTF servers. For instance, if people don't want to play MAP13 in IDL201x_a.wad they usually vote for MAP04 or MAP31. The problem is that when MAP04 and MAP31 are completed, the server always goes back to MAP13, which usually ends up with people voting for another map change.

Quote from Leonard
A map is now marked as used when entered instead of when exited in the rotation list. (fixes 1669)

This is the desired behavior.
(0012715)
Torr Samaho   
2015-06-14 13:48   
This binary contains Leonard's fix. unknownna, can you check whether it works as expected?
(0012716)
unknownna   
2015-06-14 14:23   
It seems to work fine. What about Konar6's fix? The first map isn't random.
(0012717)
Torr Samaho   
2015-06-14 14:56   
How is this? It should contain the relevant part of Konar6's fix to randomize the first map.
(0012718)
unknownna   
2015-06-14 15:17   
(edited on: 2015-06-14 15:53)
That seems to work, but it's very biased to pick MAP03 if MAP01, MAP02 and MAP03 are in the maplist when using idl201x_a.wad.

Actually, the randomizer only picks 1 map and always uses that as the initial random map.

Edit:

It works fine in COOP and DM, but in CTF it always uses 1 map only.

It works fine in all other game modes. CTF is the only one that is bugged.

(0012720)
Torr Samaho   
2015-06-14 18:03   
Can you elaborate what exactly happens in CTF and what should happen instead?
(0012721)
cobalt   
2015-06-14 18:07   
Issue addressed by commit cd3f192e1a0c: A map is now marked as used when entered instead of when exited in the rotation list. (fixes 1669)
Committed by Leonard on Saturday 13 June 2015 01:04:41

Changes in files:

 docs/zandronum-history.txt | 1 +
 src/maprotation.cpp | 5 ++---
 2 files changed, 3 insertions(+), 3 deletions(-)

(0012722)
unknownna   
2015-06-14 18:11   
Let's say that I have MAP01, MAP02, MAP03, MAP04, MAP05 and MAP06 added to the map list with sv_randommaprotation set to 1. For some reason, every time you start a server, it only uses MAP06 as the first random map. It's as if the PRNG is broken in CTF or something.

It works correctly and as expected in all other game modes, i.e., MAP06 isn't always selected as the first random map in the other game modes.
(0012730)
WaTaKiD   
2015-06-15 00:17   
with this commit, if sv_maprotation 1 and no maps in the maplist, doing map map01 will crash

steps:
load doom2.wad
sv_maprotation 1
map map01
crash
(0012731)
Torr Samaho   
2015-06-15 06:14   
(edited on: 2015-06-15 06:15)
This was caused by Leonard's patch, but should be fixed now.

This shows again that beta releases are necessary before a public release.

(0012732)
cobalt   
2015-06-15 06:22   
Issue addressed by commit 0e6901ea2bbf: Fixed: In case "sv_maprotation 1" and an empty map rotation list, the CCMD map caused the server to crash (addresses 1669).
Committed by Benjamin Berkels [Torr Samaho] on Monday 15 June 2015 08:14:12

Changes in files:
 docs/zandronum-history.txt | 2 +-
 src/maprotation.cpp | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)
(0012733)
WaTaKiD   
2015-06-15 16:24   
(edited on: 2015-06-15 16:25)
looks like the crash is fixed, ive tried many different combinations of sv_maprotation, sv_randommaprotation, addmap/delmap map01, and map/changemap both offline and online, and can no longer reproduce the crash

heres the build i used incase anyone else feels like testing:'https://www.dropbox.com/s/jk657q08v2neetv/zandronum-2.1-150615-0614-0e6901e-windows.zip?dl=0 [^]'

(0012831)
unknownna   
2015-07-06 21:44   
Quote from unknownna
It works fine in all other game modes. CTF is the only one that is bugged.

The non-random CTF issue was a side effect of having compat_oldrandom enabled.