File tree Expand file tree Collapse file tree
GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update
Generals/Code/GameEngine/Source/GameLogic/Object/Update Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1464,6 +1464,38 @@ void ParticleUplinkCannonUpdate::loadPostProcess()
14641464 DEBUG_CRASH (( " ParticleUplinkCannonUpdate::loadPostProcess - Unable to find drawable for m_orbitToTargetBeamID" ));
14651465 }
14661466 }
1467+
1468+ // TheSuperHackers @bugfix stephanmeesters 13/02/2026
1469+ // For retail game compatibility, this fixes an issue where particle cannon sounds are not audible after saveload.
1470+ if ( (m_status == STATUS_CHARGING || m_status == STATUS_PREPARING || m_status == STATUS_ALMOST_READY ) &&
1471+ m_powerupSound.getEventName ().isNotEmpty () )
1472+ {
1473+ m_powerupSound.setObjectID ( getObject ()->getID () );
1474+ m_powerupSound.setPlayingHandle ( TheAudio->addAudioEvent ( &m_powerupSound ) );
1475+ }
1476+
1477+ if ( (m_status == STATUS_PREPARING || m_status == STATUS_ALMOST_READY || m_status == STATUS_READY_TO_FIRE || m_status == STATUS_PREFIRE ) &&
1478+ m_unpackToReadySound.getEventName ().isNotEmpty () )
1479+ {
1480+ m_unpackToReadySound.setObjectID ( getObject ()->getID () );
1481+ m_unpackToReadySound.setPlayingHandle ( TheAudio->addAudioEvent ( &m_unpackToReadySound ) );
1482+ }
1483+
1484+ if ( m_status == STATUS_FIRING || m_status == STATUS_POSTFIRE ||
1485+ (m_status == STATUS_PACKING && (m_laserStatus == LASERSTATUS_DECAYING || m_laserStatus == LASERSTATUS_DEAD )) )
1486+ {
1487+ if ( m_firingToIdleSound.getEventName ().isNotEmpty () )
1488+ {
1489+ m_firingToIdleSound.setObjectID ( getObject ()->getID () );
1490+ m_firingToIdleSound.setPlayingHandle ( TheAudio->addAudioEvent ( &m_firingToIdleSound ) );
1491+ }
1492+
1493+ if ( m_orbitToTargetBeamID != INVALID_DRAWABLE_ID && m_annihilationSound.getEventName ().isNotEmpty () )
1494+ {
1495+ m_annihilationSound.setDrawableID ( m_orbitToTargetBeamID );
1496+ m_annihilationSound.setPlayingHandle ( TheAudio->addAudioEvent ( &m_annihilationSound ) );
1497+ }
1498+ }
14671499 }
14681500
14691501}
Original file line number Diff line number Diff line change @@ -1557,6 +1557,37 @@ void ParticleUplinkCannonUpdate::loadPostProcess()
15571557 DEBUG_CRASH (( " ParticleUplinkCannonUpdate::loadPostProcess - Unable to find drawable for m_orbitToTargetBeamID" ));
15581558 }
15591559 }
1560- }
15611560
1561+ // TheSuperHackers @bugfix stephanmeesters 13/02/2026
1562+ // For retail game compatibility, this fixes an issue where particle cannon sounds are not audible after saveload.
1563+ if ( (m_status == STATUS_CHARGING || m_status == STATUS_PREPARING || m_status == STATUS_ALMOST_READY ) &&
1564+ m_powerupSound.getEventName ().isNotEmpty () )
1565+ {
1566+ m_powerupSound.setObjectID ( getObject ()->getID () );
1567+ m_powerupSound.setPlayingHandle ( TheAudio->addAudioEvent ( &m_powerupSound ) );
1568+ }
1569+
1570+ if ( (m_status == STATUS_PREPARING || m_status == STATUS_ALMOST_READY || m_status == STATUS_READY_TO_FIRE || m_status == STATUS_PREFIRE ) &&
1571+ m_unpackToReadySound.getEventName ().isNotEmpty () )
1572+ {
1573+ m_unpackToReadySound.setObjectID ( getObject ()->getID () );
1574+ m_unpackToReadySound.setPlayingHandle ( TheAudio->addAudioEvent ( &m_unpackToReadySound ) );
1575+ }
1576+
1577+ if ( m_status == STATUS_FIRING || m_status == STATUS_POSTFIRE ||
1578+ (m_status == STATUS_PACKING && (m_laserStatus == LASERSTATUS_DECAYING || m_laserStatus == LASERSTATUS_DEAD )) )
1579+ {
1580+ if ( m_firingToIdleSound.getEventName ().isNotEmpty () )
1581+ {
1582+ m_firingToIdleSound.setObjectID ( getObject ()->getID () );
1583+ m_firingToIdleSound.setPlayingHandle ( TheAudio->addAudioEvent ( &m_firingToIdleSound ) );
1584+ }
1585+
1586+ if ( m_orbitToTargetBeamID != INVALID_DRAWABLE_ID && m_annihilationSound.getEventName ().isNotEmpty () )
1587+ {
1588+ m_annihilationSound.setDrawableID ( m_orbitToTargetBeamID );
1589+ m_annihilationSound.setPlayingHandle ( TheAudio->addAudioEvent ( &m_annihilationSound ) );
1590+ }
1591+ }
1592+ }
15621593}
You can’t perform that action at this time.
0 commit comments