Skip to content

bugfix(audio): Fix particle cannon being inaudible after saveload#2302

Open
stephanmeesters wants to merge 1 commit intoTheSuperHackers:mainfrom
stephanmeesters:bigfix-particlecannon-audio
Open

bugfix(audio): Fix particle cannon being inaudible after saveload#2302
stephanmeesters wants to merge 1 commit intoTheSuperHackers:mainfrom
stephanmeesters:bigfix-particlecannon-audio

Conversation

@stephanmeesters
Copy link

@stephanmeesters stephanmeesters commented Feb 13, 2026

Fixes issue where sound from the particle cannon is not audible after saveload.

Tested with savegames in scenarios

  • STATUS_FIRING -- actively firing
  • STATUS_POSTFIRE -- beam is in decay
  • STATUS_PACKING -- beam has decayed, cleaning up

Adds sound handles for m_firingToIdleSound which is the sound at the particle cannon itself, and m_annihilationSound which is the sound of the beam.

Todo

  • Replicate to Generals

@greptile-apps
Copy link

greptile-apps bot commented Feb 13, 2026

Greptile Overview

Greptile Summary

Restores particle cannon audio after save/load by re-registering sound handles in loadPostProcess() when the cannon is in STATUS_FIRING, STATUS_POSTFIRE, or STATUS_PACKING states.

  • Adds sound handle restoration for m_firingToIdleSound (cannon sound) and m_annihilationSound (beam sound)
  • Mirrors the existing pattern used in setLogicalStatus() at ParticleUplinkCannonUpdate.cpp:1239-1242 and createOrbitToTargetLaser() at ParticleUplinkCannonUpdate.cpp:1052-1056
  • Properly checks conditions before registering: sound event name must be non-empty, and for beam sound, beam drawable must exist

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The fix follows established patterns from the same codebase, properly checks preconditions, addresses a specific bug with clear reproduction steps, and only affects save/load behavior without changing runtime logic
  • No files require special attention

Important Files Changed

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

}
}

// TheSuperHackers @info stephanmeesters 13/02/2026
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bugfix


// 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 )
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why POSTFIRE and PACKING ?

Can you explain how the statuses relate to the lifetime of the 2 sounds?

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.

Particle Cannon Sound is not audible after saveload

2 participants