Skip to content
Merged
Show file tree
Hide file tree
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 @@ -1156,6 +1156,14 @@ void ChinookAIUpdate::aiDoCommand(const AICommandParms* parms)
{
const Real THRESH = 3.0f;
const Real THRESH_SQR = THRESH*THRESH;
#if RETAIL_COMPATIBLE_CRC
const bool allowExit = true;
#else
// TheSuperHackers @bugfix Stubbjax 04/11/2025 Passengers are no longer all dumped in a single frame.
const ContainModuleInterface* contain = getObject()->getContain();
const bool allowExit = contain && contain->hasObjectsWantingToEnterOrExit();
#endif

if (calcDistSqr(*getObject()->getPosition(), parms->m_pos) > THRESH_SQR &&
m_flightStatus == CHINOOK_LANDED)
{
Expand All @@ -1166,7 +1174,7 @@ void ChinookAIUpdate::aiDoCommand(const AICommandParms* parms)
setMyState(TAKING_OFF, NULL, NULL, CMD_FROM_AI);
passItThru = false;
}
else
else if (allowExit)
{
// do this INSTEAD of the standard stuff
setMyState(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1291,6 +1291,14 @@ void ChinookAIUpdate::aiDoCommand(const AICommandParms* parms)
{
const Real THRESH = 3.0f;
const Real THRESH_SQR = THRESH*THRESH;
#if RETAIL_COMPATIBLE_CRC
const bool allowExit = true;
#else
// TheSuperHackers @bugfix Stubbjax 04/11/2025 Passengers are no longer all dumped in a single frame.
const ContainModuleInterface* contain = getObject()->getContain();
const bool allowExit = contain && contain->hasObjectsWantingToEnterOrExit();
#endif

if (calcDistSqr(*getObject()->getPosition(), parms->m_pos) > THRESH_SQR &&
m_flightStatus == CHINOOK_LANDED)
{
Expand All @@ -1301,7 +1309,7 @@ void ChinookAIUpdate::aiDoCommand(const AICommandParms* parms)
setMyState(TAKING_OFF, NULL, NULL, CMD_FROM_AI);
passItThru = false;
}
else
else if (allowExit)
{
// do this INSTEAD of the standard stuff
setMyState(
Expand Down
Loading