Skip to content

Conversation

@Stubbjax
Copy link

This change prevents veterancy effects from showing for dead units. It will also save running some redundant upgrade logic once retail compatibility is dropped.

Issue Demonstrations

DEAD_VET_1.mp4
DEAD_VET_2.mp4

@Stubbjax Stubbjax self-assigned this Dec 10, 2025
@Stubbjax Stubbjax 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 Dec 10, 2025
#if RETAIL_COMPATIBLE_CRC
if (isEffectivelyDead())
return;
#endif
Copy link

Choose a reason for hiding this comment

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

That should do:

#if RETAIL_COMPATIBLE_CRC
	doAnimation &= isEffectivelyDead();
#endif

Copy link
Author

@Stubbjax Stubbjax Dec 11, 2025

Choose a reason for hiding this comment

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

Does it really matter when they're effectively the same thing and this one is deprecated? Having them the same highlights that both compatible and non-compatible logic is identical and the only difference is when it is called.

Copy link

Choose a reason for hiding this comment

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

My motivation here was to get rid of the return in the middle of the function.

void Object::onVeterancyLevelChanged( VeterancyLevel oldLevel, VeterancyLevel newLevel, Bool provideFeedback )
{
#if !RETAIL_COMPATIBLE_CRC
if (isEffectivelyDead())
Copy link

Choose a reason for hiding this comment

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

Can add TheSuperHackers comment because it is user facing, even if obvious what it does.

&& outerDrawable
&& outerDrawable->isVisible();

#if RETAIL_COMPATIBLE_CRC

Choose a reason for hiding this comment

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

Does this require retail compatibility? It looks like this only disables sound and visuals locally.

Copy link
Author

Choose a reason for hiding this comment

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

Technically not. The idea is that this code gets removed when retail compatibility is dropped, so leaving this here will make it easier to keep track of.

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 ZH Relates to Zero Hour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants