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

Map vote changes to the wrong map #32

Open
aqua-hopps opened this issue Jul 11, 2023 · 10 comments
Open

Map vote changes to the wrong map #32

aqua-hopps opened this issue Jul 11, 2023 · 10 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed unconfirmed We couldn't reproduce the bug

Comments

@aqua-hopps
Copy link

aqua-hopps commented Jul 11, 2023

Describe the bug
When a map vote is cancelled manually during the vote by an admin. If another map vote is called and passed, the map will first change to the map of the passed vote, then to the map of the cancelled vote.

To Reproduce
Steps to reproduce the behavior:

  1. Start a vote for map A
  2. Admin cancels the vote using !cancelvote
  3. Start another vote for map B and passes
  4. Map changes to B then instantly changes to A

Expected behavior
Server should not change to the map of the cancelled vote.

Game Server

  • Sourcemod version: 1.11.6934
  • Metamod version: 1.11.1148
  • Custom Votes plugin version: 1.19.4U
  • Game: Team Fortress 2

Additional context
Not sure if the same can happen for other types of vote.

@caxanga334 caxanga334 self-assigned this Jul 11, 2023
@caxanga334 caxanga334 added bug Something isn't working unconfirmed We couldn't reproduce the bug labels Jul 11, 2023
@caxanga334
Copy link
Owner

caxanga334 commented Jul 11, 2023

I could not reproduce this issue on my server. The server did not change to map A after changing to map B.

L 07/11/2023 - 10:24:52: [Custom Votes] Vote Change the map started by Anonymous Player ( - ). To change map from mvm_coaltown to mvm_bigrock.
L 07/11/2023 - 10:25:22: [Custom Votes] Vote Change the map started by Anonymous Player ( - ). To change map from mvm_coaltown to mvm_decoy.
L 07/11/2023 - 10:25:24: [Custom Votes] Last vote ( Change the map ) passed. Map was changed from mvm_coaltown to mvm_decoy.

Please test again on a clean sourcemod install with only core plugins and this plugin.

@aqua-hopps
Copy link
Author

aqua-hopps commented Jul 11, 2023

When the map vote recieved votes less than the passing ratio, the cancelvote works as expected:

L 07/11/2023 - 21:34:51: [Custom Votes] Vote Change map started by 国服第一毛茸茸爱好者 ( STEAM_0:1:43503746 ). To change map from cp_process_f12 to cp_gullywash_f7.
L 07/11/2023 - 21:34:58: "国服第一毛茸茸爱好者<3><[U:1:87007493]><Red>" say "!cancelvote"
L 07/11/2023 - 21:35:15: [Custom Votes] Vote Change map started by 国服第一毛茸茸爱好者 ( STEAM_0:1:43503746 ). To change map from cp_process_f12 to koth_product_final.
L 07/11/2023 - 21:35:17: [Custom Votes] Last vote ( Change map ) passed. Map was changed from cp_process_f12 to koth_product_final.
L 07/11/2023 - 21:35:17: [basecommands.smx] "Console<0><Console><Console>" changed map to "koth_product_final"
L 07/11/2023 - 21:35:20: [SM] Changed map to "koth_product_final"

@aqua-hopps
Copy link
Author

aqua-hopps commented Jul 11, 2023

When it already recieved votes greater than the passing ratio while some players haven't voted, the cancelvote doesn't work properly:

L 07/11/2023 - 21:36:30: [Custom Votes] Vote Change map started by 国服第一毛茸茸爱好者 ( STEAM_0:1:43503746 ). To change map from koth_product_final to cp_gullywash_f9.
L 07/11/2023 - 21:36:33: "国服第一毛茸茸爱好者<3><[U:1:87007493]><Red>" say "!cancelvote"
L 07/11/2023 - 21:36:44: [Custom Votes] Vote Change map started by 国服第一毛茸茸爱好者 ( STEAM_0:1:43503746 ). To change map from koth_product_final to cp_process_f12.
L 07/11/2023 - 21:36:46: [Custom Votes] Last vote ( Change map ) passed. Map was changed from koth_product_final to cp_process_f12.
L 07/11/2023 - 21:36:46: [basecommands.smx] "Console<0><Console><Console>" changed map to "cp_process_f12"
L 07/11/2023 - 21:36:49: [SM] Changed map to "cp_process_f12"
L 07/11/2023 - 21:36:49: [Custom Votes] Last vote ( Change map ) passed. Map was changed from koth_product_final to cp_gullywash_f9.
L 07/11/2023 - 21:36:55: [basecommands.smx] "Console<0><Console><Console>" changed map to "cp_gullywash_f9"
L 07/11/2023 - 21:36:58: [SM] Changed map to "cp_gullywash_f9"

caxanga334 added a commit that referenced this issue Jul 11, 2023
@caxanga334
Copy link
Owner

See if the issue still occurs on this version.
cvreduxmodified_dev.zip

@aqua-hopps
Copy link
Author

It still occurs unfortunately.

@caxanga334 caxanga334 added the help wanted Extra attention is needed label Jul 12, 2023
@aqua-hopps
Copy link
Author

Another behavior I observed:
When a list vote received votes exceeding the passing ratio, while some players haven't voted.
If the vote is cancelled manually, the options of the list vote are reordered.

To Reproduce
Steps to reproduce the behavior:

  1. Start a vote for Option 5 in the list
  2. The vote exceeds the passing ratio, while some players haven't voted (AFK)
  3. Admin cancels the vote using !cancelvote
  4. Option 5 is now Option 1 in the list vote.

@aqua-hopps
Copy link
Author

aqua-hopps commented Jul 12, 2023

Suggested Fix:
If a vote recieved votes exceeding passing ratio, it shouldn't wait for players that haven't voted.
This would prevent admins from canceling the vote thus breaking the plugin.

caxanga334 added a commit that referenced this issue Jul 12, 2023
@caxanga334
Copy link
Owner

Test this version please.
cvreduxmodified_dev2.zip

@aqua-hopps
Copy link
Author

Test this version please. cvreduxmodified_dev2.zip

This fixed the map vote. The list vote behavior persists.

@caxanga334
Copy link
Owner

Test this version please. cvreduxmodified_dev2.zip

This fixed the map vote. The list vote behavior persists.

Different issue, moved to #33

caxanga334 added a commit that referenced this issue Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed unconfirmed We couldn't reproduce the bug
Projects
None yet
Development

No branches or pull requests

2 participants