Skip to content

Commit 2497fa2

Browse files
committed
bugfix: Chinooks no longer get stuck when performing Combat Drops into buildings above terrain height
1 parent 636c40f commit 2497fa2

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/ChinookAIUpdate.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,11 @@ class ChinookCombatDropState : public State
360360
for (std::list<ObjectID>::iterator oit = it->rappellerIDs.begin(); oit != it->rappellerIDs.end(); )
361361
{
362362
Object* rappeller = TheGameLogic->findObjectByID(*oit);
363+
#if RETAIL_COMPATIBLE_CRC
363364
if (rappeller == NULL || rappeller->isEffectivelyDead() || !rappeller->isAboveTerrain())
365+
#else
366+
if (rappeller == NULL || rappeller->isEffectivelyDead() || !rappeller->isAboveTerrain() || rappeller->isContained())
367+
#endif
364368
{
365369
oit = it->rappellerIDs.erase(oit);
366370
}

GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/ChinookAIUpdate.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,11 @@ class ChinookCombatDropState : public State
361361
for (std::list<ObjectID>::iterator oit = it->rappellerIDs.begin(); oit != it->rappellerIDs.end(); )
362362
{
363363
Object* rappeller = TheGameLogic->findObjectByID(*oit);
364+
#if RETAIL_COMPATIBLE_CRC
364365
if (rappeller == NULL || rappeller->isEffectivelyDead() || !rappeller->isAboveTerrain())
366+
#else
367+
if (rappeller == NULL || rappeller->isEffectivelyDead() || !rappeller->isAboveTerrain() || rappeller->isContained())
368+
#endif
365369
{
366370
oit = it->rappellerIDs.erase(oit);
367371
}

0 commit comments

Comments
 (0)