Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -579,11 +579,13 @@ Bool TransportContain::isSpecificRiderFreeToExit(Object* specificObject)
return FALSE;

#if !RETAIL_COMPATIBLE_CRC
// TheSuperHackers @bugfix Stubbjax 02/03/2026 If our parent container is held, then we
// are not free to exit.
DEBUG_ASSERTCRASH(specificObject->getContainedBy(), ("rider must be contained"));
if (specificObject->getContainedBy()->isDisabledByType(DISABLED_HELD))
// TheSuperHackers @bugfix Stubbjax/bobtista 01/08/2026 We are not free to exit when our container
// is held inside another container. A container merely held in place on the terrain,
// eg the battle bus, can still unload passengers.
if (me->getContainedBy() != nullptr && me->isDisabledByType(DISABLED_HELD))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Is the me->isDisabledByType(DISABLED_HELD) condition still needed then? In what situation would me->getContainedBy() != nullptr be true and me->isDisabledByType(DISABLED_HELD) be false?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

They are equivalent for the normal stock transport-containment paths, but they are distinct engine states: OpenContain/HealContain can contain objects without setting DISABLED_HELD, and scripts can change the flag independently. Keeping both limits this fix to transports that are actually nested and held; the added getContainedBy() check is what distinguishes those from a Battle Bus merely held in place on the terrain.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Is this an LLM generated answer or actually verified to be correct?

{
return FALSE;
}
#endif

// I can always kick people out if I am in the air, I know what I'm doing
Expand Down
Loading