bugfix(audio): Fix particle cannon being inaudible after saveload#2302
Open
stephanmeesters wants to merge 1 commit intoTheSuperHackers:mainfrom
Open
bugfix(audio): Fix particle cannon being inaudible after saveload#2302stephanmeesters wants to merge 1 commit intoTheSuperHackers:mainfrom
stephanmeesters wants to merge 1 commit intoTheSuperHackers:mainfrom
Conversation
Greptile Overview
|
| Filename | Overview |
|---|---|
| GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/ParticleUplinkCannonUpdate.cpp | Restores audio events for particle cannon sounds after save/load by re-registering sound handles in loadPostProcess() when cannon is firing |
Last reviewed commit: 7d22e2e
xezon
reviewed
Feb 13, 2026
| } | ||
| } | ||
|
|
||
| // TheSuperHackers @info stephanmeesters 13/02/2026 |
|
|
||
| // TheSuperHackers @info stephanmeesters 13/02/2026 | ||
| // Fix issue where sound from the particle cannon is not audible after saveload | ||
| if( m_status == STATUS_FIRING || m_status == STATUS_POSTFIRE || m_status == STATUS_PACKING ) |
There was a problem hiding this comment.
Why POSTFIRE and PACKING ?
Can you explain how the statuses relate to the lifetime of the 2 sounds?
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.Cycle sequence of beam firing vs sounds
STATUS_LASERSTATUS_PACKING(1)NONECHARGINGNONEpowerupSoundunpackToReadySoundfiringToIdleSoundannihilationSoundpowerupSoundPREPARINGNONEunpackToReadySoundfiringToIdleSoundannihilationSoundpowerupSoundunpackToReadySoundALMOST_READYNONEpowerupSoundunpackToReadySoundREADY_TO_FIRENONEpowerupSoundfiringToIdleSoundannihilationSoundunpackToReadySoundPREFIRENONEunpackToReadySoundFIRINGBORNfiringToIdleSoundannihilationSoundpowerupSoundunpackToReadySoundfiringToIdleSoundannihilationSoundPOSTFIREBORNfiringToIdleSoundannihilationSoundPACKING(2)DECAYINGDEADfiringToIdleSoundannihilationSoundIDLENONEpowerupSoundunpackToReadySoundfiringToIdleSoundannihilationSoundStatus meanings
IDLE: Particle cannon is inactive and fully reset.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: Pack-up phase after attack/ready path.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/pack, at particle cannon.annihilationSound: beam-impact, at origin beam.Todo