Skip to content

Conversation

@Stubbjax
Copy link

@Stubbjax Stubbjax commented Nov 3, 2025

This change prevents rappelling units from being manually ejected during combat drops.

Before

Clicking a passenger's icon in the command bar during a combat drop will eject that unit in the air

DANGEROUS_RAPPEL.mp4

After

Clicking a passenger's icon in the command bar during a combat drop will do nothing

SAFE_RAPPEL.mp4

@Stubbjax Stubbjax self-assigned this Nov 3, 2025
@Stubbjax Stubbjax added AI Is AI related 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 Nov 3, 2025
@Skyaero42 Skyaero42 added Fix Is fixing something, but is not user facing and removed Bug Something is not working right, typically is user facing labels Nov 3, 2025
Object* rappeller = getPotentialRappeller(obj);
if (rappeller != NULL)
{
rappeller->setStatus(MAKE_OBJECT_STATUS_MASK(OBJECT_STATUS_IS_USING_ABILITY));
Copy link

Choose a reason for hiding this comment

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

Should this be added AFTER confirming door is available?
If I understand correctly, when a door is not available, the status will never get cleared (the loop only clears units in the tracking list), so the unit could get stuck with the flag.

Copy link
Author

Choose a reason for hiding this comment

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

The door cannot be reserved unless getAiFreeToExit returns true. If you follow the chain, you'll find reserveDoorForExitisSpecificRiderFreeToExitgetAiFreeToExit. It really only needs the status to be set directly before and to be cleared directly after, but I felt it was not as intuitive. Perhaps it is better to do it this way to reduce complexity and the likelihood of unforeseen consequences.

rappeller->setStatus(OBJECT_STATUS_IS_USING_ABILITY);
exitInterface->reserveDoorForExit();
rappeller->clearStatus(OBJECT_STATUS_IS_USING_ABILITY);

It's unexpected that a door is unavailable when rappelling as indicated by DEBUG_CRASH(("rappeller is not free to exit... what?"));.

Copy link

Choose a reason for hiding this comment

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

Ah, I see what you mean, so the status has to be set before the door reservation, makes sense. This works, although I really enjoy watching the bugged version 😆 . LGTM

Copy link

@Skyaero42 Skyaero42 left a comment

Choose a reason for hiding this comment

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

This causes a mismatch with retail with the RETAIL_COMPATIBLE_CRC set at (1)

@Skyaero42 Skyaero42 self-requested a review November 4, 2025 06:19
Copy link

@Skyaero42 Skyaero42 left a comment

Choose a reason for hiding this comment

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

Well done. I tested it and it no longer mismatches.

Summarizing:

  • Tested and works as described.
  • Tested that the RETAIL_COMPATIBLE_CRC guard is used correctly. Normal build does not mismatch against retail.
  • The code looks good.

@Skyaero42 Skyaero42 added the Approved Pull Request was approved label Nov 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI Is AI related Approved Pull Request was approved Fix Is fixing something, but is not 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.

USA Ranger can fall out of Chinook when hitting evacuation before Chinook reached target destination

3 participants