bugfix(audio): Fix particle cannon being inaudible after saveload#2302
Merged
xezon merged 5 commits intoFeb 28, 2026
Merged
Conversation
|
| Filename | Overview |
|---|---|
| Generals/Code/GameEngine/Source/GameLogic/Object/Update/ParticleUplinkCannonUpdate.cpp | Added sound restoration logic in loadPostProcess() to fix inaudible particle cannon after saveload, correctly mapping states to active sounds per the documented state table |
| GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/ParticleUplinkCannonUpdate.cpp | Added sound restoration logic in loadPostProcess() to fix inaudible particle cannon after saveload, correctly mapping states to active sounds per the documented state table |
Last reviewed commit: 63f3646
xezon
reviewed
Feb 13, 2026
…viously inaudible sounds
xezon
reviewed
Feb 14, 2026
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
xezon
approved these changes
Feb 27, 2026
xezon
left a comment
There was a problem hiding this comment.
Code looks ok. I did not test and did not verify all these conditions are correct. Not important, because it is a temporary fix. Needs to be replicated to Generals.
xezon
approved these changes
Feb 28, 2026
Okladnoj
pushed a commit
to Okladnoj/GeneralsGameCode
that referenced
this pull request
Mar 1, 2026
4 tasks
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.
Fixes issue where sound from the particle cannon is not audible after saveload.
A savegame can be made during any of combinations of
STATUS_andLASERSTATUS_below. Sounds are triggered only during state change, so when loading a savegame any of the sounds in the Active column need to be added.Tested with a savegame for each
STATUS_.Repeating sequence of the particle cannon
STATUS_LASERSTATUS_PACKING(1)NONECHARGINGNONEpowerupSoundunpackToReadySoundfiringToIdleSoundannihilationSoundpowerupSoundPREPARINGNONEunpackToReadySoundfiringToIdleSoundannihilationSoundpowerupSoundunpackToReadySoundALMOST_READYNONEpowerupSoundunpackToReadySoundREADY_TO_FIRENONEpowerupSoundfiringToIdleSoundannihilationSoundunpackToReadySoundPREFIRENONEunpackToReadySoundFIRINGNONEBORNfiringToIdleSoundannihilationSound¹powerupSoundunpackToReadySoundfiringToIdleSoundannihilationSoundPOSTFIREBORNfiringToIdleSoundannihilationSoundPACKING(2)DECAYINGDEADannihilationSound²firingToIdleSoundannihilationSoundIDLENONEpowerupSoundunpackToReadySoundfiringToIdleSoundannihilationSound¹ Sound added at
LASERSTATUS_BORN² Sound cleared at
LASERSTATUS_DEADPACKINGappears twice for some reason.Status meanings
PACKING(1): Particle cannon is inactive and fully reset. Idle state.CHARGING: Early pre-ready phase; charging loop plays.PREPARING: Antenna/deploy preparation phase.ALMOST_READY: Near-ready phase before final ready state.READY_TO_FIRE: Weapon is available and waiting for fire command.PREFIRE: Transitional pre-shot state (defined and checked, typically brief/rare in this flow).FIRING: Main active attack phase while beam is operating.POSTFIRE: Attack is decaying after firing window ends.PACKING(2): Pack-up phase after attack/ready path.IDLE: Another form of idle, used to reset audio, lasts very short.Laser status meanings
NONE: No orbital beam lifecycle started yet for current cycle.BORN: Orbit-to-target beam was created and is in active phase.DECAYING: Beam is in decay/shutdown window.DEAD: Beam lifecycle is finished (end state before reset toNONEon next cycle setup).Sound meanings
powerupSound: Charge, at particle cannon.unpackToReadySound: Prep, at particle cannon.firingToIdleSound: Firing/packing, at particle cannon.annihilationSound: Beam-impact, at origin beam.Todo