You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Parse the INI value IsGroundAligned as enum values No and Yes instead of boolean. This will make it possible to set IsGroundAligned = CONFORMING in the INI later.
Rename m_isGroundAligned to m_particleAlignment.
Rename F_ISXYPLANAR to F_PARTICLEALIGNMENT
Introduce enum type in place of the boolean type.
Update the ParticleSystemInfo xfer version to handle the new enum save.
• Replaces the ground-alignment boolean with an extensible particle-alignment enum.
• Parses and emits existing No/Yes INI values through enum mappings.
• Versions snapshot transfers while preserving legacy saves, rendering, and editor behavior.
The enum-backed approach is appropriate because it preserves current No/Yes behavior while creating a clear extension point for future alignment modes. Keeping the old boolean alongside a new setting would create competing state, while string-based runtime storage would weaken type safety. The version-gated boolean-to-enum conversion and centralized shouldBillboard() query minimize compatibility and downstream behavior changes.
Files changed (6) +43 / -15
Enhancement (1) +22 / -6
ParticleSys.cppParse, propagate, and serialize particle alignment+22/-6
Parse, propagate, and serialize particle alignment
• Initializes and copies the alignment enum, parses 'IsGroundAligned' through the enum name list, and routes field-particle limits through 'shouldBillboard()'. Increases the snapshot version outside retail-compatible saves while translating version 1 booleans to and from enum values.
ParticleSys.hDefine particle alignment enum and billboard query+14/-2
Define particle alignment enum and billboard query
• Replaces 'm_isGroundAligned' with 'ParticleAlignmentType' and defines billboard and XY-planar modes. Adds the 'No'/'Yes' name mapping and updates 'shouldBillboard()' to evaluate the enum.
• Renames the particle field constant to reflect general alignment and serializes 'IsGroundAligned' using the enum name table instead of boolean strings.
This PR replaces the particle system’s ground-alignment boolean with an extensible alignment enum while preserving existing INI behavior and save compatibility.
Parses IsGroundAligned through the No/Yes alignment-name table.
Maps legacy version-1 boolean save data to billboard or XY-planar alignment.
Writes version-2 alignment state as a fixed-underlying-type enum while retaining retail-compatible version-1 output.
Updates rendering, editor controls, particle limits, and both game variants’ INI exporters to use the new alignment representation.
Confidence Score: 5/5
The PR appears safe to merge, with no outstanding correctness or repository-rule findings identified.
The follow-up change gives the serialized enum a fixed 32-bit underlying type in the repository’s required C++20 configuration, and the complete change consistently preserves legacy save loading, retail-compatible saving, INI parsing, rendering behavior, editor controls, and both variant exporters.
Important Files Changed
Filename
Overview
Core/GameEngine/Include/GameClient/ParticleSys.h
Defines the fixed-underlying-type particle-alignment enum, its INI names, and billboard query.
Keeps Zero Hour particle-system export aligned with the shared enum representation.
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
INI["INI: IsGroundAligned = No / Yes"] --> Parse["Parse alignment enum"]
V1["Version 1 save: boolean"] --> Map["Map false/true to billboard/XY-planar"]
V2["Version 2 save: enum"] --> Load["Load particle alignment"]
Parse --> State["ParticleAlignmentType"]
Map --> State
Load --> State
State --> Render["Billboard or XY-planar rendering"]
State --> Editor["Particle Editor switch"]
State --> Export["Generals and Zero Hour INI export"]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GenRelates to GeneralsRefactorEdits the code with insignificant behavior changes, is never user facingZHRelates to Zero Hour
3 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Parse the INI value
IsGroundAlignedas enum valuesNoandYesinstead of boolean. This will make it possible to setIsGroundAligned = CONFORMINGin the INI later.m_isGroundAlignedtom_particleAlignment.F_ISXYPLANARtoF_PARTICLEALIGNMENTParticleSystemInfoxfer version to handle the new enum save.Todo