Skip to content

Commit 26710b9

Browse files
authored
fix(update): Extend the height of the USA Particle Cannon laser beam for enormous camera heights (TheSuperHackers#2220)
1 parent 32a2789 commit 26710b9

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

Generals/Code/GameEngine/Source/GameLogic/Object/Update/ParticleUplinkCannonUpdate.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@
5858
#include "GameLogic/Module/PhysicsUpdate.h"
5959
#include "GameLogic/Module/ActiveBody.h"
6060

61-
61+
// TheSuperHackers @fix Mirelle 04/02/2026: Raised from 500.0f so that
62+
// enormous camera heights cannot see above the laser origin.
63+
constexpr const Real ORBITAL_BEAM_Z_OFFSET = 3500.0f;
6264

6365
//-------------------------------------------------------------------------------------------------
6466
//-------------------------------------------------------------------------------------------------
@@ -550,7 +552,7 @@ UpdateSleepTime ParticleUplinkCannonUpdate::update()
550552

551553
Coord3D orbitPosition;
552554
orbitPosition.set( &m_currentTargetPosition );
553-
orbitPosition.z += 500.0f;
555+
orbitPosition.z += ORBITAL_BEAM_Z_OFFSET;
554556

555557
Real scorchRadius = 0.0f;
556558
Real damageRadius = 0.0f;
@@ -918,7 +920,7 @@ void ParticleUplinkCannonUpdate::createGroundToOrbitLaser( UnsignedInt growthFra
918920
{
919921
Coord3D orbitPosition;
920922
orbitPosition.set( &m_laserOriginPosition );
921-
orbitPosition.z += 500.0f;
923+
orbitPosition.z += ORBITAL_BEAM_Z_OFFSET;
922924
update->initLaser( nullptr, &m_laserOriginPosition, &orbitPosition, growthFrames );
923925
}
924926
}
@@ -957,7 +959,7 @@ void ParticleUplinkCannonUpdate::createOrbitToTargetLaser( UnsignedInt growthFra
957959
{
958960
Coord3D orbitPosition;
959961
orbitPosition.set( &m_initialTargetPosition );
960-
orbitPosition.z += 500.0f;
962+
orbitPosition.z += ORBITAL_BEAM_Z_OFFSET;
961963
update->initLaser( nullptr, &orbitPosition, &m_initialTargetPosition, growthFrames );
962964
}
963965
}

GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/ParticleUplinkCannonUpdate.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@
5858
#include "GameLogic/Module/PhysicsUpdate.h"
5959
#include "GameLogic/Module/ActiveBody.h"
6060

61-
61+
// TheSuperHackers @fix Mirelle 04/02/2026: Raised from 500.0f so that
62+
// enormous camera heights cannot see above the laser origin.
63+
constexpr const Real ORBITAL_BEAM_Z_OFFSET = 3500.0f;
6264

6365
//-------------------------------------------------------------------------------------------------
6466
//-------------------------------------------------------------------------------------------------
@@ -625,7 +627,7 @@ UpdateSleepTime ParticleUplinkCannonUpdate::update()
625627

626628
Coord3D orbitPosition;
627629
orbitPosition.set( &m_currentTargetPosition );
628-
orbitPosition.z += 500.0f;
630+
orbitPosition.z += ORBITAL_BEAM_Z_OFFSET;
629631

630632
Real scorchRadius = 0.0f;
631633
Real damageRadius = 0.0f;
@@ -1003,7 +1005,7 @@ void ParticleUplinkCannonUpdate::createGroundToOrbitLaser( UnsignedInt growthFra
10031005
{
10041006
Coord3D orbitPosition;
10051007
orbitPosition.set( &m_laserOriginPosition );
1006-
orbitPosition.z += 500.0f;
1008+
orbitPosition.z += ORBITAL_BEAM_Z_OFFSET;
10071009
update->initLaser( nullptr, nullptr, &m_laserOriginPosition, &orbitPosition, "", growthFrames );
10081010
}
10091011
}
@@ -1042,7 +1044,7 @@ void ParticleUplinkCannonUpdate::createOrbitToTargetLaser( UnsignedInt growthFra
10421044
{
10431045
Coord3D orbitPosition;
10441046
orbitPosition.set( &m_initialTargetPosition );
1045-
orbitPosition.z += 500.0f;
1047+
orbitPosition.z += ORBITAL_BEAM_Z_OFFSET;
10461048
update->initLaser( nullptr, nullptr, &orbitPosition, &m_initialTargetPosition, "", growthFrames );
10471049
}
10481050
}

0 commit comments

Comments
 (0)