Skip to content

Conversation

@xezon
Copy link

@xezon xezon commented Sep 15, 2025

Merge with Rebase

This change fixes the missing horde condition of Nationalism and Fanaticism weapon bonuses.

The fix is opt-in by setting Action = HORDE_FIXED in HordeUpdate behavior modules.

By default, the game uses the new fixed behavior, but the retail game will still use the old bugged behavior, because all modules explicitly set Action = HORDE.

TODO

  • Test this works correctly after refactor
  • Replicate in Generals

@xezon xezon added Bug Something is not working right, typically is user facing China Affects China faction Major Severity: Minor < Major < Critical < Blocker Gen Relates to Generals ZH Relates to Zero Hour NoRetail This fix or change is not applicable with Retail game compatibility labels Sep 15, 2025
@xezon
Copy link
Author

xezon commented Sep 17, 2025

Just realized this change also closes pending pull #1300

@xezon xezon force-pushed the xezon/fix-horde-bonus branch 3 times, most recently from 1919908 to 67aef63 Compare November 3, 2025 18:07
@xezon
Copy link
Author

xezon commented Nov 3, 2025

I have recreated the commits. First commit is a refactor to improve and simplify the Horde Bonus code, and then the second commit implements the bug fix. I have also put it behind RETAIL_COMPATIBLE_CRC.

@xezon xezon requested a review from Mauller November 3, 2025 18:08
Copy link

@Mauller Mauller left a comment

Choose a reason for hiding this comment

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

Look good.

Might want to manually replicate this to generals since the codes a bit different and fanaticism doesn't exist there etc.

@Mauller Mauller added the Approved Pull Request was approved label Nov 3, 2025
@xezon xezon force-pushed the xezon/fix-horde-bonus branch from 67aef63 to ee4f8b9 Compare November 5, 2025 21:15
@xezon
Copy link
Author

xezon commented Nov 6, 2025

Replication to Generals is difficult because of major conflicts. Needs #1813 first.

@xezon xezon force-pushed the xezon/fix-horde-bonus branch from ee4f8b9 to e280662 Compare November 7, 2025 12:12
xezon added 2 commits November 7, 2025 18:11
…cism weapon bonuses (#1582)

This fix is opt-in by setting Action=HORDE_FIXED in HordeUpdate behavior modules
@xezon xezon force-pushed the xezon/fix-horde-bonus branch from e280662 to f24d2cc Compare November 7, 2025 17:14
@xezon
Copy link
Author

xezon commented Nov 7, 2025

Replicated in Generals with mini conflict

$ git apply -p2 --directory=Generals --reject --whitespace=fix changes.patch
Checking patch Generals/Code/GameEngine/Include/Common/Player.h...
Hunk #1 succeeded at 289 (offset -20 lines).
Checking patch Generals/Code/GameEngine/Include/GameLogic/Module/AIUpdate.h...
error: while searching for:
class JetAIUpdate;

enum AIStateType CPP_11(: Int);
enum ObjectID CPP_11(: Int);



error: patch failed: Generals/Code/GameEngine/Include/GameLogic/Module/AIUpdate.h:57
Hunk #2 succeeded at 547 (offset -14 lines).
Checking patch Generals/Code/GameEngine/Include/GameLogic/Module/HordeUpdate.h...
Checking patch Generals/Code/GameEngine/Source/Common/RTS/Player.cpp...
Hunk #1 succeeded at 2511 (offset -481 lines).
Hunk #2 succeeded at 2522 (offset -481 lines).
Checking patch Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate.cpp...
Hunk #1 succeeded at 4426 (offset -252 lines).
Hunk #2 succeeded at 4554 (offset -252 lines).
Checking patch Generals/Code/GameEngine/Source/GameLogic/Object/Update/HordeUpdate.cpp...
Hunk #6 succeeded at 392 (offset -10 lines).
Applied patch Generals/Code/GameEngine/Include/Common/Player.h cleanly.
Applying patch Generals/Code/GameEngine/Include/GameLogic/Module/AIUpdate.h with 1 reject...
Rejected hunk #1.
Hunk #2 applied cleanly.
Applied patch Generals/Code/GameEngine/Include/GameLogic/Module/HordeUpdate.h cleanly.
Applied patch Generals/Code/GameEngine/Source/Common/RTS/Player.cpp cleanly.
Applied patch Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate.cpp cleanly.
Applied patch Generals/Code/GameEngine/Source/GameLogic/Object/Update/HordeUpdate.cpp cleanly.
$ git apply -p2 --directory=Generals --reject --whitespace=fix changes.patch                           Checking patch Generals/Code/GameEngine/Include/GameLogic/Module/AIUpdate.h...
Hunk #1 succeeded at 552 (offset -13 lines).
Checking patch Generals/Code/GameEngine/Include/GameLogic/Module/HordeUpdate.h...
Checking patch Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate.cpp...
Hunk #1 succeeded at 4501 (offset -252 lines).
Hunk #2 succeeded at 4546 (offset -252 lines).
Checking patch Generals/Code/GameEngine/Source/GameLogic/Object/Update/HordeUpdate.cpp...
Applied patch Generals/Code/GameEngine/Include/GameLogic/Module/AIUpdate.h cleanly.
Applied patch Generals/Code/GameEngine/Include/GameLogic/Module/HordeUpdate.h cleanly.
Applied patch Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate.cpp cleanly.
Applied patch Generals/Code/GameEngine/Source/GameLogic/Object/Update/HordeUpdate.cpp cleanly.

@xezon xezon merged commit 972240b into TheSuperHackers:main Nov 7, 2025
19 checks passed
xezon added a commit that referenced this pull request Nov 7, 2025
@xezon xezon deleted the xezon/fix-horde-bonus branch November 7, 2025 17:56
fbraz3 pushed a commit to fbraz3/GeneralsX that referenced this pull request Nov 10, 2025
fbraz3 pushed a commit to fbraz3/GeneralsX that referenced this pull request Nov 10, 2025
…cism weapon bonuses (TheSuperHackers#1582)

This fix is opt-in by setting Action=HORDE_FIXED in HordeUpdate behavior modules
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Approved Pull Request was approved Bug Something is not working right, typically is user facing China Affects China faction Gen Relates to Generals Major Severity: Minor < Major < Critical < Blocker NoRetail This fix or change is not applicable with Retail game compatibility ZH Relates to Zero Hour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants