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
6 changes: 2 additions & 4 deletions Generals/Code/GameEngine/Source/Common/RTS/ActionManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -454,10 +454,8 @@ Bool ActionManager::canResumeConstructionOf( const Object *obj,
if( obj->isKindOf( KINDOF_DOZER ) == FALSE )
return FALSE;

Relationship r = obj->getRelationship(objectBeingConstructed);

// only available to our allies
if( r != ALLIES )
// TheSuperHackers @bugfix Stubbjax 06/01/2025 Ensure only the owner of the construction can resume it.
if (obj->getControllingPlayer() != objectBeingConstructed->getControllingPlayer())

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 CRC safe?

See DozerAIUpdate::privateResumeConstruction, perhaps an AIPlayer could call this? Maybe Scripts could call this too?

If not CRC safe, then this check needs to go to case ACTIONTYPE_RESUME_CONSTRUCTION: in InGameUI::canSelectedObjectsDoAction for RETAIL_COMPATIBLE_CRC

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.

I believe it is safe. The AI player already ensures it is the owner of a building it wants to resume construction of. I could not find a way to resume construction via script. (It doesn't really make sense, regardless. As far as I can tell, there's no way to place a scaffold in the World Builder.)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Okay. Let us hope for the best.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Alas, it wasn't meant to be. This change is not retail compatible.

return FALSE;

// if the objectBeingConstructed is not actually under construction we can't resume that!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -458,10 +458,8 @@ Bool ActionManager::canResumeConstructionOf( const Object *obj,
if( obj->isKindOf( KINDOF_DOZER ) == FALSE )
return FALSE;

Relationship r = obj->getRelationship(objectBeingConstructed);

// only available to our allies
if( r != ALLIES )
// TheSuperHackers @bugfix Stubbjax 06/01/2025 Ensure only the owner of the construction can resume it.
if (obj->getControllingPlayer() != objectBeingConstructed->getControllingPlayer())
return FALSE;

// if the objectBeingConstructed is not actually under construction we can't resume that!
Expand Down
Loading