fix(spectregunship): Decouple particle system in SpectreGunshipUpdate::update from logic crc - #3055
Conversation
6b305c3 to
d656c3f
Compare
d656c3f to
23cbbf0
Compare
Caball009
left a comment
There was a problem hiding this comment.
The title and description are no longer up-to-date, and provide inadequate rationale for this change. It's not at all clear to me why this change would be needed.
23cbbf0 to
53458d0
Compare
With RETAIL_COMPATIBLE_CRC=0 the headless dummy particle manager does not load particle system templates, so data->m_gattlingStrafeFXParticleSystem is null. The gattling targeting block was gated on that pointer, so a headless client skipped it and left m_gattlingTargetPosition and m_okToFireHowitzerCounter unchanged, diverging in logic crc from a graphical client; the howitzer GameLogicRandomValue calls then cascade the desync further. Run the targeting logic whenever the gattling is firing in the non-retail branch, independent of the template, and keep the template check only on the client-side particle creation. The original condition is preserved under RETAIL_COMPATIBLE_CRC so retail stays byte-identical even if an INI omits the particle template. Matches the pattern used in EMPUpdate, SpecialAbilityUpdate and TransitionDamageFX.
53458d0 to
d9eaaeb
Compare
|
@xezon @githubawn |
Caball009
left a comment
There was a problem hiding this comment.
The current description and change make a lot more sense to me. I checked with RETAIL_COMPATIBLE_CRC disabled and there's indeed a mismatch issue here for headless mode.
I have added two suggested changes that'll provide a cleaner overall change.
PS: The game uses "gattling" all over the place, but the actual spelling is "gatling".
|
I wonder if there are more cases like this that we overlooked. The retail compatible changes were checked pretty thoroughly with a lot replays, but that's less easy to do for non-retail. |
Apply review suggestions: move the tmp declaration into the retail branch, restore the original shroud check, and pass the template directly to createParticleSystem, which already null-checks it. Behavior is unchanged.
fixed to |
|
Not that it really matters, but why did you remove the |
I checked the other obvious GameLogic particle-template guards. One additional mismatch case remains in FlightDeckBehavior.cpp: the particle-template condition at line 1287 also gates the m_catapultSystemFrame[i] = FOREVER state write at line 1290, and that frame value is serialized at line 1702. A client missing the particle template therefore keeps different game state. TLDR FlightDeckBehavior could be a small followup |
|
When the game logic was decoupled from the particle systems,
SpectreGunshipUpdatewas left coupled.The gattling targeting logic only ran when the particle template was present. In headless mode (
RETAIL_COMPATIBLE_CRC=0) the templates are not loaded, so the pointer is null and the block was skipped → the logic CRC of a headless client diverges from a graphical one.Decoupled following the same pattern as the neighboring fixes (marker
// TheSuperHackers @fix The particle system is now decoupled from the logic crc):Retail is preserved under
#if RETAIL_COMPATIBLE_CRC. Verified with a full deterministic replay (headless macOS ↔ Windows).