Skip to content

[TF2] Add names to the vote controllers and add a dummy issue as the first issue in each vote controller #1157

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

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

Conversation

FlaminSarge
Copy link
Contributor

Description

Some community mods relied on vote index 0 effectively being a no-op for custom vote handling.
Prior to the team-based vote_controller rework, issue index 0 would be KickIssue, which when triggered by a community mod, would no-op since the kick vote had no target set. However, after the rework, index 0 became RestartGame and these mods would accidentally trigger a game restart if they attempted to use index 0. Workarounds for the mods such as using an out-of-bound index also resulted in problems.

This PR adds a dummy issue as index 0 on all 3 vote controllers so that those mods may function again.
Other Source games with voting should add the same type of Dummy issue so that these community mods can function on those games as well.

It also adds names to each vote controller, and in a followup PR I plan to add VScript support to CVoteController.

…issue in each vote controller

Some community mods relied on vote index 0 for custom handling, but ever since KickIssue was removed from the global controller those mods would run into issues due to RestartGame being applied at the end of a custom vote
Bitl added a commit to BitlDevelopmentStudios/source-sdk-2013-bds-base that referenced this pull request May 10, 2025
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

Successfully merging this pull request may close these issues.

1 participant