Skip to content

fix(weapon): Align Aurora weapon behavior with the GO reference build - #3057

Open
Okladnoj wants to merge 1 commit into
TheSuperHackers:mainfrom
Okladnoj:okji/bugfix/aurora-die-on-detonate
Open

fix(weapon): Align Aurora weapon behavior with the GO reference build#3057
Okladnoj wants to merge 1 commit into
TheSuperHackers:mainfrom
Okladnoj:okji/bugfix/aurora-die-on-detonate

Conversation

@Okladnoj

@Okladnoj Okladnoj commented Aug 3, 2026

Copy link
Copy Markdown

The macOS port used for paired win↔mac testing is built from the GOD-Team (GeneralsOnline) repository, where SupW_AuroraFuelBombWeapon forces MissileCallsOnDie. This brings the same behavior here so the deterministic
builds stay in lockstep.

Guarded by #if !RETAIL_COMPATIBLE_CRC && !PRESERVE_MISSING_AURORA_SECOND_EXPLOSION — retail is not affected.

P.S. If this force is removed from GO's code and not applied in TSH, there is no desync either: both builds fall back to retail behavior. The force is needed solely to match the current GO build.

@Skyaero42

Copy link
Copy Markdown

Considering this is a data issue, I think the fix belongs in Patch2 @Stubbjax rather than a hack in the code.

@xezon

xezon commented Aug 3, 2026

Copy link
Copy Markdown

I agree with Skyaero. We do some hacks for UI, but not these kind of hacks for gameplay bugs. We will fix them in INI instead.

@githubawn

Copy link
Copy Markdown

The core issue is broader than just Patch2. Because the retail Aurora Alpha omitted MissileCallsOnDie = Yes, any custom mod weapon inspired by or copy-pasted from it over the last 20 years inherited the exact same bug once the deterministic math pr gets merged.

@xezon

xezon commented Aug 3, 2026

Copy link
Copy Markdown

I think key is

This also matters for macOS/Windows parity: the client used for cross-platform determinism testing forces
the same flag, so without it the two builds desync on any replay containing an Aurora Alpha.

Need to understand why.

@xezon

xezon commented Aug 3, 2026

Copy link
Copy Markdown

I do not understand what the root problem is from the given description. My impression right now is if MissileCallsOnDie is not called then something else happens and that causes cross play mismatch. Is that right? If yes, what is it and can we fix it?

@Okladnoj

Okladnoj commented Aug 3, 2026

Copy link
Copy Markdown
Author

I do not understand what the root problem is from the given description. My impression right now is if MissileCallsOnDie is not called then something else happens and that causes cross play mismatch. Is that right? If yes, what is it and can we fix it?

That from your's repo
https://github.com/GeneralsOnlineDevelopmentTeam/GameClient/blob/fe65574f3aad4bc4a3a897bfc205db79cd6397bd/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Weapon.cpp#L1696

@xezon

xezon commented Aug 3, 2026

Copy link
Copy Markdown

That is Generals Online Repo.

@Okladnoj

Okladnoj commented Aug 4, 2026

Copy link
Copy Markdown
Author

That is Generals Online Repo.

After all, our ultimate goal is to unite GOD-Team and TSH. If we are talking about determinism in this broader context, shouldn’t we be targeting the GO services? We’ll have to take this Aurora implementation and do something with it anyway. It would be better to make everything a little more synchronized now, ahead of the future merge. This hack will also serve as a reminder of where the set of INI files still needs to be improved.

@xezon

xezon commented Aug 4, 2026

Copy link
Copy Markdown

Can you explain what the cross play bug with MissileCallsOnDie is, if anything?

@githubawn

Copy link
Copy Markdown

GO allows more hacks compared to TSH considering one has a live service to run and the other has 20 years of backwards compatibility to consider. (I actually have a test port of "TSH on GO" running locally right now that only includes the networking changes, zero gameplay changes).

Instead of looking at this as a data/INI issue, I want to ask: is there a truly fundamental fix we could apply to this in-engine that doesn't involve hardcoding exceptions or altering how the data structure is read?"

@Okladnoj

Okladnoj commented Aug 4, 2026

Copy link
Copy Markdown
Author

Can you explain what the cross play bug with MissileCallsOnDie is, if anything?

In branch branch, commit 4a3002d2c1ce18ac75f8a4c13d3e60ce3c72fa53, the state without the Aurora fix desyncs at frame 18804 (see screenshots). The replay is attached in PR #7's description — you can verify it yourself.

At the determinism-consolidation stage I'd advise against getting into whether the fix is "the correct one." GO did it this way, and GO is the only build I can guarantee the result on, so I suggest keeping this fix as-is. Once there's work aimed at fixing the content itself, everything will get sorted out within that scope anyway.

screenshot

image image

SupW_AuroraFuelBombWeapon does not specify MissileCallsOnDie in INI, so
getDieOnDetonate() returns false and MissileAIUpdate::detonate() skips the
attemptDamage() call that runs the die modules of the projectile. The second
explosion then never happens when the target is a structure.

The fix belongs in the game data, which does not live in this repository, so
the flag is forced for that one weapon behind PRESERVE_MISSING_AURORA_SECOND_EXPLOSION.
Retail builds are unaffected.
@Okladnoj
Okladnoj force-pushed the okji/bugfix/aurora-die-on-detonate branch from 19408c4 to 851b1e3 Compare August 5, 2026 00:58
@Okladnoj

Okladnoj commented Aug 5, 2026

Copy link
Copy Markdown
Author

Comment maked shorter

@Caball009 Caball009 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aside from the point that this is a GO specific code workaround for something that should probably be handled in data, what's missing is a good explanation why this change fixes something that would otherwise be non-deterministic (across clients).

@xezon

xezon commented Aug 5, 2026

Copy link
Copy Markdown

At the determinism-consolidation stage I'd advise against getting into whether the fix is "the correct one." GO did it this way, and GO is the only build I can guarantee the result on, so I suggest keeping this fix as-is. Once there's work aimed at fixing the content itself, everything will get sorted out within that scope anyway.

Maybe you are onto something and there is a determinism bug behind the original Aurora weapon behaviour, but changing (not fixing) the Aurora weapon behavior only masks it. Try to find the root cause.

We will change the Aurora weapon behavior in INI.

@Okladnoj Okladnoj changed the title bugfix(weapon): Fix missing Aurora Alpha second explosion on structures fix(weapon): Align Aurora weapon behavior with the GO reference build Aug 5, 2026
@Okladnoj

Okladnoj commented Aug 5, 2026

Copy link
Copy Markdown
Author

Maybe you are onto something and there is a determinism bug behind the original Aurora weapon behaviour, but changing (not fixing) the Aurora weapon behavior only masks it. Try to find the root cause.

We will change the Aurora weapon behavior in INI.

There is most likely no determinism violation in the original weapon behavior. It's a matter of choosing the weapon's behavior — first by MrS-ibra (27146d0), then by x64-dev (e08d0ca) on the GOD-Team repo.

If it's important to you not to carry this behavior into TSH, I can drop the fix from the mac repo (GOD-Team) and not take it into TSH for the paired mac↔windows network tests. But then I'd have to redo a whole series of manual test runs that could stretch across more than a week: all the easy, obvious desyncs are already fixed, and what's left is very well hidden — tracking down a single small thing can take several days.

@xezon

xezon commented Aug 5, 2026

Copy link
Copy Markdown

If this is just needed for testing, may I suggest to just put a local modified INI file with the fix for the Aurora weapon?

@Okladnoj

Okladnoj commented Aug 5, 2026

Copy link
Copy Markdown
Author

If this is just needed for testing, may I suggest to just put a local modified INI file with the fix for the Aurora weapon?

Yes, we can do it that way—then the fix itself is unnecessary.

But for the retail version, we currently have many different sources of INI patches, with no consolidation at all. Is it worth addressing this at this stage just for Aurora? Also, if I’m not mistaken, a single source of truth is maintained only in the GO project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants