Conversation
|
Nightly build for this pull request:
This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build. |
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new configuration option to disable the game speed slider in skirmish and multiplayer games, allowing map authors and hosts to lock the game speed at a specific value. The feature is primarily intended for custom maps and to prevent trolling behavior.
- Adds a
DisableGameSpeedconfiguration flag that can be set via spawn options or lobby checkboxes - Implements UI hiding and network event blocking for the game speed slider when disabled
- Preserves game speed control for skirmish observers regardless of the configuration
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Spawner/Spawner.Config.h | Adds DisableGameSpeed boolean field declaration and initialization |
| src/Spawner/Spawner.Config.cpp | Adds INI file loading for the DisableGameSpeed configuration option |
| src/Misc/GameSpeedSlider.h | Defines new GameSpeedSlider class with static methods for checking enabled/disabled state |
| src/Misc/GameSpeedSlider.cpp | Implements game speed slider control logic with hooks for UI hiding and network event filtering |
| Spawner.vcxproj | Adds new GameSpeedSlider source and header files to the project |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
Ok, it seems that the visual ui aspect of the slider being hidden works 100%. However, if someone has unpatched files they can still change the speed. My network event patch only stops the display of who's doing it instead. |
Remove networking patches
Removes the redundant `IsDisabled` method and inverts the logic where it was used. This simplifies the code and makes it easier to understand the enabled/disabled state of the game speed slider.
|
Redone and simplified the code a lot, @Belonit already made a hook for that, so I just reused it, works fine. |
This pull request introduces a new feature for controlling the visibility and functionality of the Game Speed (FPS) slider via a configuration option.(For skirmish and/or multiplayer games).
Map authors for custom maps, such as survival or mission style multiplayer maps, may intend to lock game speed at a certain value. Also, the ability for host to lock the gamespeed is useful to stop trolls from constantly spamming game speed changes when they are losing.
Observers in skirmish are not affected by this. If the checkbox or spawn option is forced they are always able to change gamespeed.
Checkbox example for
GameLobbyBase.ini:Forced spawn ini options for
GameOptions.ini: