Skip to content
Open
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
7 changes: 7 additions & 0 deletions Generals/Code/GameEngine/Source/GameLogic/Object/Object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3998,7 +3998,14 @@ void Object::onCapture( Player *oldOwner, Player *newOwner )
{
// Everybody dhills when they captured so they don't keep doing something the new player might not want him to be doing
if( getAIUpdateInterface() && (oldOwner != newOwner) )
{
#if RETAIL_COMPATIBLE_CRC
getAIUpdateInterface()->aiIdle(CMD_FROM_AI);
#else
if (oldOwner->getRelationship(newOwner->getDefaultTeam()) != ALLIES)
getAIUpdateInterface()->aiIdle(CMD_FROM_AI);
#endif
}

// this gets the new owner some points
newOwner->getScoreKeeper()->addObjectCaptured(this);
Expand Down
7 changes: 7 additions & 0 deletions GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4519,7 +4519,14 @@ void Object::onCapture( Player *oldOwner, Player *newOwner )
{
// Everybody dhills when they captured so they don't keep doing something the new player might not want him to be doing
if( getAIUpdateInterface() && (oldOwner != newOwner) )
{
#if RETAIL_COMPATIBLE_CRC
getAIUpdateInterface()->aiIdle(CMD_FROM_AI);
#else
if (oldOwner->getRelationship(newOwner->getDefaultTeam()) != ALLIES)
getAIUpdateInterface()->aiIdle(CMD_FROM_AI);
#endif
}

// this gets the new owner some points
newOwner->getScoreKeeper()->addObjectCaptured(this);
Expand Down
Loading