Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a new “sprays” feature (client/server support, configurable enable + cooldown, bindable control, console commands, and an in-game spray picker), and also fixes overlapping decal rendering so newer decals draw on top.
Changes:
- Implement sprays end-to-end: gameplay action, networking packets/state sync, server config gating + cooldown enforcement, and client-side decal creation with sound.
- Add UI/UX for selecting sprays (options panel button + modal spray picker) and persist selection/toggle in player settings.
- Fix decal draw order by changing decal poly insertion to render newest decals on top, and ensure spray state is cleared on level transitions / disconnects.
Reviewed changes
Copilot reviewed 31 out of 42 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| resources/licensing-info.txt | Adds attribution for the new spray sound asset. |
| resources/CMakeLists.txt | Packs new spray audio and decal texture assets into the VPP. |
| game_patch/sound/sound.h | Exposes a helper to retrieve the spray sound ID. |
| game_patch/sound/sound.cpp | Registers the spray sound and caches its resolved sound ID. |
| game_patch/rf/player/player.h | Adds per-player spray cooldown timestamp storage. |
| game_patch/rf/player/control_config.h | Adds a new bindable control action for spraying. |
| game_patch/rf/geometry.h | Adds engine function reference for decal destruction. |
| game_patch/multi/sprays.h | Declares the new sprays feature interface. |
| game_patch/multi/sprays.cpp | Implements spray decal creation/rendering, server validation/cooldown, state sync, and decal order fix hook. |
| game_patch/multi/server.h | Exposes sprays config accessors for other subsystems. |
| game_patch/multi/server.cpp | Implements sprays enable/cooldown accessors and avoids spawning spectators. |
| game_patch/multi/server_internal.h | Adds dedicated server [sprays] configuration structure. |
| game_patch/multi/network.h | Adds join-accept feature flag to advertise sprays support. |
| game_patch/multi/network.cpp | Sends/consumes allow_sprays flag and syncs spray state for late joiners. |
| game_patch/multi/multi.h | Stores allow_sprays in server info for clients. |
| game_patch/multi/multi.cpp | Installs the sprays patch as part of MP patch initialization. |
| game_patch/multi/lms.cpp | Excludes spectators from LMS “enough players loaded” logic. |
| game_patch/multi/kill.cpp | Clears spray state on level init. |
| game_patch/multi/dedi_cfg.cpp | Parses/prints dedicated server [sprays] config settings. |
| game_patch/multi/alpine_packets.h | Adds new client/server request payloads and flags for sprays. |
| game_patch/multi/alpine_packets.cpp | Serializes/deserializes spray packets and applies received sprays client-side. |
| game_patch/misc/ui.cpp | Adds “Select spray” control in advanced options and routes input to the spray picker modal. |
| game_patch/misc/spray_picker.h | Declares the spray picker modal interface. |
| game_patch/misc/spray_picker.cpp | Implements the spray picker modal (layout, scrolling grid, selection). |
| game_patch/misc/player.cpp | Clears per-player spray state on disconnect/destroy. |
| game_patch/misc/alpine_settings.h | Adds spray display/selection settings and clamps selection by available count. |
| game_patch/misc/alpine_settings.cpp | Loads/saves spray display + selection to the player settings file. |
| game_patch/main/main.cpp | Renders the spray picker each frame. |
| game_patch/input/key.cpp | Adds default keybind + dispatch path for the new Spray action (including high action indices). |
| game_patch/CMakeLists.txt | Adds new sprays and spray picker sources to the build. |
| docs/CHANGELOG.md | Documents sprays feature and decal rendering order fix for 1.4.0. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Spraycontrolcl_spraysconsole command to toggle local display and dedicated server[sprays]config sectionsprayconsole command to select spray, and in-game spray picker in advanced options