Skip to content

Conversation

@Stubbjax
Copy link

This change fixes an issue that allows riders to rank up even if they are not trainable. For example, a player might place a Worker on a Combat Cycle and then drive over a Salvage Crate.

Before

A mounted Worker ranks up when driving over a Salvage Crate

RANKED_WORKER.mp4

After

Only trainable mounted units can rank up

TRAINABLE_VET.mp4

Note: The changes to Generals are solely for unification. Riders do not exist there.

@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 NoRetail This fix or change is not applicable with Retail game compatibility labels Dec 10, 2025
return FALSE;

#if !RETAIL_COMPATIBLE_CRC
const ContainModuleInterface* contain = other->getContain();
Copy link

Choose a reason for hiding this comment

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

// TheSuperHackers @bugfix ...

return FALSE;

// Sorry, you can't gain levels
if( !other->getExperienceTracker()->isTrainable() )
Copy link

Choose a reason for hiding this comment

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

Seeing these conditions now used at 2 places, how about add a function in Object for "eligibleForLevelUp" and then call that here and in CommandXlat? This way the conditions stay in sync.

Copy link
Author

Choose a reason for hiding this comment

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

I did consider this, but as one of the usages is debug logic, I thought it would not really be that useful.

Copy link

Choose a reason for hiding this comment

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

I probably would add a Object::isTrainable, since it has this intricacy with the Rider.

@Stubbjax Stubbjax force-pushed the fix-rider-trainability branch from 30f557c to fce6f1d Compare December 10, 2025 15:42
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 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