base icon indicating copy to clipboard operation
base copied to clipboard

Update server.cpp to get map from vote starter

Open nochinator opened this issue 1 year ago • 2 comments

Fixes #1012

Changes proposed in this request:

  • if the server does not have the map of the winning vote then the server now gets the map from the player who started the vote, instead of the player who was on the server the longest.
  • This is implementing by adding an argument to getmap for the vote starter's user id (number, not username). it tries to get the map from this player first. it defaults to -1 which is not a player so if it is unspecified then it will use the old functionality.
  • The old functionality is used as a fallback in case getting the map from the vote starter fails. If the server already has the map it simply uses that (same as before).

nochinator avatar Jul 14 '24 12:07 nochinator

Keep in mind that getmap requires the server to be open for no rotational maps voted by the players, means the allowed map list needed to be opened for it.

dc-redeclipse avatar Jul 22 '24 11:07 dc-redeclipse

If I understand what your saying, then this doesn't apply to the changes I've made. It will use normal behavior if the server already has the map (eg. map that is in rotation) These changes are to fix an issue when a player suggests (on a server that allows out of rotation maps) a map that the server does not have (eg. a edited map or custom map), then the server would get it from the player who was online the longest, rather than the player to start the vote as expected. If I've misunderstood you're comment then feel free to explain.

nochinator avatar Jul 27 '24 23:07 nochinator