Skip to content

unify(object): Merge the unit veterancy effect changes including the veterancy effect fix for detected stealth units from Zero Hour#1455

Merged
xezon merged 2 commits intoTheSuperHackers:mainfrom
Stubbjax:fix-veterancy-effect-spawning-at-origin
Aug 15, 2025
Merged

unify(object): Merge the unit veterancy effect changes including the veterancy effect fix for detected stealth units from Zero Hour#1455
xezon merged 2 commits intoTheSuperHackers:mainfrom
Stubbjax:fix-veterancy-effect-spawning-at-origin

Conversation

@Stubbjax
Copy link

@Stubbjax Stubbjax commented Aug 14, 2025

This change ports the provideFeedback parameter and respective logic regarding the veterancy effect from Zero Hour to Generals. It also fixes a bug in Generals where detected stealth units would not play the veterancy effect.

@xezon
Copy link

xezon commented Aug 14, 2025

Is this meant to be merged with Rebase?

Edit:

  1. Most of commits 2 & 3 look to be a unify change.

  2. Then the remainder of 1 & 2 are the bugfix.

  3. And then 4 & 5 are the optimization/refactor.

I suggest create 3 Pull for these that build on top of each other, in that order.

Copy link

Choose a reason for hiding this comment

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

This can be simplified more:

Set provideFeedback = FALSE in case LEVEL_REGULAR

Then move this code up here to down below:

if( provideFeedback && TheGameLogic->getDrawIconUI() )
{
  Bool hideAnimationForStealth = !isLocallyControlled() &&
				testStatus( OBJECT_STATUS_STEALTHED ) &&
				!testStatus( OBJECT_STATUS_DETECTED ) &&
				!testStatus( OBJECT_STATUS_DISGUISED );

  Bool doAnimation = ( ! hideAnimationForStealth
									&& (newLevel > oldLevel)
									&& ( ! isKindOf(KINDOF_IGNORED_IN_GUI))); //First, we plan to do the animation if the level went up

  if ( doAnimation )
  {
    ...
  }
}

@xezon xezon added Bug Something is not working right, typically is user facing Minor Severity: Minor < Major < Critical < Blocker Gen Relates to Generals ZH Relates to Zero Hour labels Aug 14, 2025
@Stubbjax Stubbjax force-pushed the fix-veterancy-effect-spawning-at-origin branch from 5a8f644 to e4a0bf0 Compare August 14, 2025 16:35
@Stubbjax
Copy link
Author

I suggest create 3 Pull for these that build on top of each other, in that order.

Updated!

@Stubbjax Stubbjax changed the title bugfix: Prevent veterancy effect spawning at origin for spawned units unify: Merge provide-feedback logic of Zero Hour veterancy effect with Generals Aug 14, 2025
@xezon xezon added this to the Code foundation build up milestone Aug 14, 2025
@xezon xezon added Unify Unifies code between Generals and Zero Hour and removed ZH Relates to Zero Hour Bug Something is not working right, typically is user facing labels Aug 14, 2025
@xezon xezon changed the title unify: Merge provide-feedback logic of Zero Hour veterancy effect with Generals unify(object): Merge the feedback switch for the unit veterancy effect from Zero Hour Aug 14, 2025
@xezon xezon changed the title unify(object): Merge the feedback switch for the unit veterancy effect from Zero Hour unify(object): Merge the unit veterancy effect changes including the veterancy effect fix for detected stealth units from Zero Hour Aug 14, 2025
@xezon xezon added the Bug Something is not working right, typically is user facing label Aug 14, 2025
@xezon
Copy link

xezon commented Aug 14, 2025

Title updated.

@xezon
Copy link

xezon commented Aug 14, 2025

Is this meant to be merged with rebase? If yes then the commit titles need updating.

@Stubbjax
Copy link
Author

Is this meant to be merged with rebase? If yes then the commit titles need updating.

I had not intended it to be. If that is preferable, what titles do you suggest?

@xezon
Copy link

xezon commented Aug 15, 2025

unify(object): Merge the condition switch for the unit veterancy effect from Zero Hour (#1455)
unify(object): Merge the missing veterancy effect fix for detected stealth units from Zero Hour (#1455)

@Stubbjax Stubbjax force-pushed the fix-veterancy-effect-spawning-at-origin branch from e4a0bf0 to 5a61dca Compare August 15, 2025 07:19
@Stubbjax
Copy link
Author

unify(object): Merge the condition switch for the unit veterancy effect from Zero Hour (#1455)
unify(object): Merge the missing veterancy effect fix for detected stealth units from Zero Hour (#1455)

Done.

@xezon xezon merged commit 9e4d4a2 into TheSuperHackers:main Aug 15, 2025
11 checks passed
xezon pushed a commit that referenced this pull request Aug 15, 2025
@Stubbjax Stubbjax deleted the fix-veterancy-effect-spawning-at-origin branch August 15, 2025 13:18
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
fbraz3 pushed a commit to fbraz3/GeneralsX that referenced this pull request Feb 23, 2026
fbraz3 pushed a commit to fbraz3/GeneralsX that referenced this pull request Feb 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something is not working right, typically is user facing Gen Relates to Generals Minor Severity: Minor < Major < Critical < Blocker Unify Unifies code between Generals and Zero Hour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants