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
10 changes: 9 additions & 1 deletion Generals/Code/GameEngine/Source/GameLogic/Object/Object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3996,9 +3996,17 @@ void Object::removeUpgrade( const UpgradeTemplate *upgradeT )
//-------------------------------------------------------------------------------------------------
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
// Everybody chills when they captured so they don't keep doing something the new player might not want him to be doing
// TheSuperHackers @tweak Stubbjax 19/11/2025 Except when the new owner is an ally, so that Hackers keep on hacking, etc.
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
10 changes: 9 additions & 1 deletion GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4517,9 +4517,17 @@ void Object::removeUpgrade( const UpgradeTemplate *upgradeT )
//-------------------------------------------------------------------------------------------------
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
// Everybody chills when they captured so they don't keep doing something the new player might not want him to be doing
// TheSuperHackers @tweak Stubbjax 19/11/2025 Except when the new owner is an ally, so that Hackers keep on hacking, etc.
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