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

Update server.cpp to get map from vote starter #1572

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nochinator
Copy link
Contributor

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).

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. 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 continues as normal.
@dc-redeclipse
Copy link
Contributor

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.

@nochinator
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Problems regarding sendmap/voting a new edit map while online.
2 participants