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
2 changes: 1 addition & 1 deletion GeneralsMD/Code/GameEngine/Include/Common/MessageStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ class GameMessage : public MemoryPoolObject
MSG_CREATE_FORMATION, ///< Creates a formation.
MSG_LOGIC_CRC, ///< CRC from the logic passed around in a network game :)
MSG_SET_MINE_CLEARING_DETAIL, ///< CRC from the logic passed around in a network game :)
MSG_ENABLE_RETALIATION_MODE, ///< Turn retaliation mode on or off for the specified player.
MSG_ENABLE_RETALIATION_MODE, ///< Turn retaliation mode on or off.

MSG_BEGIN_DEBUG_NETWORK_MESSAGES = 1900, ///< network messages that exist only in debug/internal builds. all grouped separately.

Expand Down
2 changes: 2 additions & 0 deletions GeneralsMD/Code/GameEngine/Source/Common/RTS/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,9 @@ void Player::update()
GameMessage *msg = TheMessageStream->appendMessage( GameMessage::MSG_ENABLE_RETALIATION_MODE );
if( msg )
{
#if RETAIL_COMPATIBLE_CRC
msg->appendIntegerArgument( getPlayerIndex() );
#endif
msg->appendBooleanArgument( TheGlobalData->m_clientRetaliationModeEnabled );
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -632,15 +632,26 @@ void GameLogic::logicMessageDispatcher( GameMessage *msg, void *userData )

case GameMessage::MSG_ENABLE_RETALIATION_MODE:
{
#if RETAIL_COMPATIBLE_CRC
Copy link
Author

Choose a reason for hiding this comment

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

Probably actually use RETAIL_COMPATIBLE_NETWORKING here because it doesn't change the CRC

Copy link

Choose a reason for hiding this comment

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

I expect it can still be part of replays if it was recorded while someone used a Control Hack.

Copy link
Author

@stephanmeesters stephanmeesters Mar 5, 2026

Choose a reason for hiding this comment

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

OK but those will still mismatch with current patch as we don't read the player index from the msg argument anymore

Copy link
Author

Choose a reason for hiding this comment

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

So it's the same question as in #2380 about whether to allow the control hack in retail compat mode

Copy link

Choose a reason for hiding this comment

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

I suggest we favour correct expectations for RETAIL_COMPATIBLE_CRC over Anti Cheat. Otherwise we run into another mismatch in the future just to find out that it is caused by this fix which is a waste of time for us (Caball009).

//Logically turns on or off retaliation mode for a specified player.
Int playerIndex = msg->getArgument( 0 )->integer;
Bool enableRetaliation = msg->getArgument( 1 )->boolean;
const Int playerIndex = msg->getArgument( 0 )->integer;
const Bool enableRetaliation = msg->getArgument( 1 )->boolean;

Player *player = ThePlayerList->getNthPlayer( playerIndex );
if( player )
{
DEBUG_ASSERTCRASH(player == thisPlayer,
("Retaliation mode of player '%ls' was illegally set by player '%ls'. Before: '%d', after: '%d'.",
player->getPlayerDisplayName().str(), thisPlayer->getPlayerDisplayName().str(),
player->isLogicalRetaliationModeEnabled(), enableRetaliation) );

player->setLogicalRetaliationModeEnabled( enableRetaliation );
}
#else
// TheSuperHackers @fix stephanmeesters 08/03/2026 Ensure that players can only set their own retaliation mode.
const Bool enableRetaliation = msg->getArgument( 0 )->boolean;
thisPlayer->setLogicalRetaliationModeEnabled( enableRetaliation );
#endif
break;
}

Expand Down
Loading