-
Notifications
You must be signed in to change notification settings - Fork 151
fix(update): Extend the height of the USA Particle Cannon laser beam for enormous camera heights #2220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
fix(update): Extend the height of the USA Particle Cannon laser beam for enormous camera heights #2220
Conversation
Greptile Overview
|
| Filename | Overview |
|---|---|
| Generals/Code/GameEngine/Source/GameLogic/Object/Update/ParticleUplinkCannonUpdate.cpp | Increased orbital beam Z-offset from 500.0f to 3500.0f to fix visual clipping at high camera elevations |
| GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/ParticleUplinkCannonUpdate.cpp | Increased orbital beam Z-offset from 500.0f to 3500.0f to fix visual clipping at high camera elevations |
Sequence Diagram
sequenceDiagram
participant PCU as ParticleUplinkCannonUpdate
participant Orbit as Orbital Position
participant Laser as Laser System
Note over PCU: Particle Uplink Cannon Firing Sequence
PCU->>PCU: update()
PCU->>Orbit: Calculate orbit position
Note over Orbit: orbitPosition.z += ORBITAL_BEAM_Z_OFFSET (3500.0f)
PCU->>Laser: Create damage and effects at target
PCU->>PCU: createGroundToOrbitLaser()
PCU->>Orbit: Calculate orbit position from ground
Note over Orbit: laserOriginPosition.z += ORBITAL_BEAM_Z_OFFSET (3500.0f)
PCU->>Laser: initLaser(ground -> orbit)
PCU->>PCU: createOrbitToTargetLaser()
PCU->>Orbit: Calculate orbit position above target
Note over Orbit: initialTargetPosition.z += ORBITAL_BEAM_Z_OFFSET (3500.0f)
PCU->>Laser: initLaser(orbit -> target)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 file reviewed, 1 comment
GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/ParticleUplinkCannonUpdate.cpp
Outdated
Show resolved
Hide resolved
|
yes please : D |
06a6632 to
91c7461
Compare
xezon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs to be replicated to Generals
| #include "GameLogic/Module/ActiveBody.h" | ||
|
|
||
|
|
||
| const Real ORBITAL_BEAM_Z_OFFSET = 5000.0f; // TheSuperHackers @fix Mirelle 30/01/2026: Raised from 500.0f |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the colon (:)
But the comment above the line:
// TheSuperHackers @fix Mirelle 30/01/2026 Raised from 500.0f
constexpr const Real ORBITAL_BEAM_Z_OFFSET = 5000.0f;| #include "GameLogic/Module/ActiveBody.h" | ||
|
|
||
|
|
||
| const Real ORBITAL_BEAM_Z_OFFSET = 5000.0f; // TheSuperHackers @fix Mirelle 30/01/2026: Raised from 500.0f |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What would be smalled sufficient value for this height to still look ok with tall camera?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3500.0f seems to be enough for all cases, even players who play on Whiteout with "MaxCameraHeight = 4800.0"
91c7461 to
053f0d1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 files reviewed, 2 comments
Generals/Code/GameEngine/Source/GameLogic/Object/Update/ParticleUplinkCannonUpdate.cpp
Show resolved
Hide resolved
GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/ParticleUplinkCannonUpdate.cpp
Show resolved
Hide resolved
053f0d1 to
5d44115
Compare
Particle Cannon "Short Beam" Fix Walkthrough
Goal
Fix the visual bug where the Particle Uplink Cannon's laser beam appeared cut off or "floating" mid-air when viewed from a distance or on high-elevation maps, rather than striking from orbit.
Changes
We modified ParticleUplinkCannonUpdate.cpp to increase the orbital origin height of the beam.
ParticleUplinkCannonUpdate.cpp
Increased Height: Changed the vertical offset from 500.0f to 5000.0f in three key locations:
update()
createGroundToOrbitLaser()
createOrbitToTargetLaser()
Introduced Named Constant: Defined ORBITAL_BEAM_Z_OFFSET to replace the magic number.
const Real ORBITAL_BEAM_Z_OFFSET = 5000.0f;
These changes ensure the beam's origin point is high enough even when zoomed out or on high maps, maintaining the illusion of an orbital strike.