From 05fd43ebadcbf341ee66c762c617704e05772cd3 Mon Sep 17 00:00:00 2001 From: githubawn <115191165+githubawn@users.noreply.github.com> Date: Sat, 7 Mar 2026 02:05:46 +0100 Subject: [PATCH 1/3] fix(audio): Decouple Particle Cannon audio spawn point from visual beam height --- .../Object/Update/ParticleUplinkCannonUpdate.cpp | 8 ++++++++ .../Object/Update/ParticleUplinkCannonUpdate.cpp | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/ParticleUplinkCannonUpdate.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/ParticleUplinkCannonUpdate.cpp index dfd2d863584..1b330f7bc8d 100644 --- a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/ParticleUplinkCannonUpdate.cpp +++ b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/ParticleUplinkCannonUpdate.cpp @@ -573,6 +573,10 @@ UpdateSleepTime ParticleUplinkCannonUpdate::update() templateLaserRadius = update->getTemplateLaserRadius(); visualLaserRadius = update->getCurrentLaserRadius(); } + // TheSuperHackers @fix anchor positional audio 500 units above the ground target + Coord3D audioPos = m_currentTargetPosition; + audioPos.z += 500.0f; + beam->setPosition( &audioPos ); } // TheSuperHackers @refactor helmutbuhler/xezon 17/05/2025 // Originally the damageRadius was calculated with a value updated by LaserUpdate::clientUpdate. @@ -962,6 +966,10 @@ void ParticleUplinkCannonUpdate::createOrbitToTargetLaser( UnsignedInt growthFra orbitPosition.z += ORBITAL_BEAM_Z_OFFSET; update->initLaser( nullptr, &orbitPosition, &m_initialTargetPosition, growthFrames ); } + // TheSuperHackers @fix anchor positional audio 500 units above the ground target + Coord3D audioPos = m_initialTargetPosition; + audioPos.z += 500.0f; + beam->setPosition( &audioPos ); } } if( m_annihilationSound.getEventName().isNotEmpty() ) diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/ParticleUplinkCannonUpdate.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/ParticleUplinkCannonUpdate.cpp index ad8efd9cebc..c3989e0ad11 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/ParticleUplinkCannonUpdate.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/ParticleUplinkCannonUpdate.cpp @@ -648,6 +648,10 @@ UpdateSleepTime ParticleUplinkCannonUpdate::update() templateLaserRadius = update->getTemplateLaserRadius(); visualLaserRadius = update->getCurrentLaserRadius(); } + // TheSuperHackers @fix anchor positional audio 500 units above the ground target + Coord3D audioPos = m_currentTargetPosition; + audioPos.z += 500.0f; + beam->setPosition( &audioPos ); } // TheSuperHackers @refactor helmutbuhler/xezon 17/05/2025 // Originally the damageRadius was calculated with a value updated by LaserUpdate::clientUpdate. @@ -1047,6 +1051,10 @@ void ParticleUplinkCannonUpdate::createOrbitToTargetLaser( UnsignedInt growthFra orbitPosition.z += ORBITAL_BEAM_Z_OFFSET; update->initLaser( nullptr, nullptr, &orbitPosition, &m_initialTargetPosition, "", growthFrames ); } + // TheSuperHackers @fix anchor positional audio 500 units above the ground target + Coord3D audioPos = m_initialTargetPosition; + audioPos.z += 500.0f; + beam->setPosition( &audioPos ); } } if( m_annihilationSound.getEventName().isNotEmpty() ) From 8d5ac97c3d11081d6a6e3cf97a55671b11d47070 Mon Sep 17 00:00:00 2001 From: githubawn <115191165+githubawn@users.noreply.github.com> Date: Sun, 8 Mar 2026 18:50:31 +0100 Subject: [PATCH 2/3] Added ORBITAL_BEAM_AUDIO_Z_OFFSET --- .../Object/Update/ParticleUplinkCannonUpdate.cpp | 11 +++++++---- .../Object/Update/ParticleUplinkCannonUpdate.cpp | 11 +++++++---- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/ParticleUplinkCannonUpdate.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/ParticleUplinkCannonUpdate.cpp index 1b330f7bc8d..e38c41f3762 100644 --- a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/ParticleUplinkCannonUpdate.cpp +++ b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/ParticleUplinkCannonUpdate.cpp @@ -61,6 +61,9 @@ // TheSuperHackers @fix Mirelle 04/02/2026: Raised from 500.0f so that // enormous camera heights cannot see above the laser origin. constexpr const Real ORBITAL_BEAM_Z_OFFSET = 3500.0f; +// TheSuperHackers @fix The positional audio is now decoupled from the beam origin. +// 500 units represent the height of the original audio emitter. +constexpr const Real ORBITAL_BEAM_AUDIO_Z_OFFSET = 500.0f; //------------------------------------------------------------------------------------------------- //------------------------------------------------------------------------------------------------- @@ -573,9 +576,9 @@ UpdateSleepTime ParticleUplinkCannonUpdate::update() templateLaserRadius = update->getTemplateLaserRadius(); visualLaserRadius = update->getCurrentLaserRadius(); } - // TheSuperHackers @fix anchor positional audio 500 units above the ground target + // TheSuperHackers @fix The positional audio is now decoupled from the beam origin. Coord3D audioPos = m_currentTargetPosition; - audioPos.z += 500.0f; + audioPos.z += ORBITAL_BEAM_AUDIO_Z_OFFSET; beam->setPosition( &audioPos ); } // TheSuperHackers @refactor helmutbuhler/xezon 17/05/2025 @@ -966,9 +969,9 @@ void ParticleUplinkCannonUpdate::createOrbitToTargetLaser( UnsignedInt growthFra orbitPosition.z += ORBITAL_BEAM_Z_OFFSET; update->initLaser( nullptr, &orbitPosition, &m_initialTargetPosition, growthFrames ); } - // TheSuperHackers @fix anchor positional audio 500 units above the ground target + // TheSuperHackers @fix The positional audio is now decoupled from the beam origin. Coord3D audioPos = m_initialTargetPosition; - audioPos.z += 500.0f; + audioPos.z += ORBITAL_BEAM_AUDIO_Z_OFFSET; beam->setPosition( &audioPos ); } } diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/ParticleUplinkCannonUpdate.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/ParticleUplinkCannonUpdate.cpp index c3989e0ad11..667275a7b10 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/ParticleUplinkCannonUpdate.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/ParticleUplinkCannonUpdate.cpp @@ -61,6 +61,9 @@ // TheSuperHackers @fix Mirelle 04/02/2026: Raised from 500.0f so that // enormous camera heights cannot see above the laser origin. constexpr const Real ORBITAL_BEAM_Z_OFFSET = 3500.0f; +// TheSuperHackers @fix The positional audio is now decoupled from the beam origin. +// 500 units represent the height of the original audio emitter. +constexpr const Real ORBITAL_BEAM_AUDIO_Z_OFFSET = 500.0f; //------------------------------------------------------------------------------------------------- //------------------------------------------------------------------------------------------------- @@ -648,9 +651,9 @@ UpdateSleepTime ParticleUplinkCannonUpdate::update() templateLaserRadius = update->getTemplateLaserRadius(); visualLaserRadius = update->getCurrentLaserRadius(); } - // TheSuperHackers @fix anchor positional audio 500 units above the ground target + // TheSuperHackers @fix The positional audio is now decoupled from the beam origin. Coord3D audioPos = m_currentTargetPosition; - audioPos.z += 500.0f; + audioPos.z += ORBITAL_BEAM_AUDIO_Z_OFFSET; beam->setPosition( &audioPos ); } // TheSuperHackers @refactor helmutbuhler/xezon 17/05/2025 @@ -1051,9 +1054,9 @@ void ParticleUplinkCannonUpdate::createOrbitToTargetLaser( UnsignedInt growthFra orbitPosition.z += ORBITAL_BEAM_Z_OFFSET; update->initLaser( nullptr, nullptr, &orbitPosition, &m_initialTargetPosition, "", growthFrames ); } - // TheSuperHackers @fix anchor positional audio 500 units above the ground target + // TheSuperHackers @fix The positional audio is now decoupled from the beam origin. Coord3D audioPos = m_initialTargetPosition; - audioPos.z += 500.0f; + audioPos.z += ORBITAL_BEAM_AUDIO_Z_OFFSET; beam->setPosition( &audioPos ); } } From 32bbb503bfc679111a3330e838252501f5975fc8 Mon Sep 17 00:00:00 2001 From: githubawn <115191165+githubawn@users.noreply.github.com> Date: Sun, 8 Mar 2026 19:08:20 +0100 Subject: [PATCH 3/3] comments removed --- .../GameLogic/Object/Update/ParticleUplinkCannonUpdate.cpp | 2 -- .../GameLogic/Object/Update/ParticleUplinkCannonUpdate.cpp | 2 -- 2 files changed, 4 deletions(-) diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/ParticleUplinkCannonUpdate.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/ParticleUplinkCannonUpdate.cpp index e38c41f3762..980a9c525af 100644 --- a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/ParticleUplinkCannonUpdate.cpp +++ b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/ParticleUplinkCannonUpdate.cpp @@ -576,7 +576,6 @@ UpdateSleepTime ParticleUplinkCannonUpdate::update() templateLaserRadius = update->getTemplateLaserRadius(); visualLaserRadius = update->getCurrentLaserRadius(); } - // TheSuperHackers @fix The positional audio is now decoupled from the beam origin. Coord3D audioPos = m_currentTargetPosition; audioPos.z += ORBITAL_BEAM_AUDIO_Z_OFFSET; beam->setPosition( &audioPos ); @@ -969,7 +968,6 @@ void ParticleUplinkCannonUpdate::createOrbitToTargetLaser( UnsignedInt growthFra orbitPosition.z += ORBITAL_BEAM_Z_OFFSET; update->initLaser( nullptr, &orbitPosition, &m_initialTargetPosition, growthFrames ); } - // TheSuperHackers @fix The positional audio is now decoupled from the beam origin. Coord3D audioPos = m_initialTargetPosition; audioPos.z += ORBITAL_BEAM_AUDIO_Z_OFFSET; beam->setPosition( &audioPos ); diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/ParticleUplinkCannonUpdate.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/ParticleUplinkCannonUpdate.cpp index 667275a7b10..9b9f5275b38 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/ParticleUplinkCannonUpdate.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/ParticleUplinkCannonUpdate.cpp @@ -651,7 +651,6 @@ UpdateSleepTime ParticleUplinkCannonUpdate::update() templateLaserRadius = update->getTemplateLaserRadius(); visualLaserRadius = update->getCurrentLaserRadius(); } - // TheSuperHackers @fix The positional audio is now decoupled from the beam origin. Coord3D audioPos = m_currentTargetPosition; audioPos.z += ORBITAL_BEAM_AUDIO_Z_OFFSET; beam->setPosition( &audioPos ); @@ -1054,7 +1053,6 @@ void ParticleUplinkCannonUpdate::createOrbitToTargetLaser( UnsignedInt growthFra orbitPosition.z += ORBITAL_BEAM_Z_OFFSET; update->initLaser( nullptr, nullptr, &orbitPosition, &m_initialTargetPosition, "", growthFrames ); } - // TheSuperHackers @fix The positional audio is now decoupled from the beam origin. Coord3D audioPos = m_initialTargetPosition; audioPos.z += ORBITAL_BEAM_AUDIO_Z_OFFSET; beam->setPosition( &audioPos );