Skip to content

GameMessage::MSG_CHEAT_ADD_CASH in CommandXlat does not consume message #2769

@xezon

Description

@xezon
    case GameMessage::MSG_CHEAT_ADD_CASH:
		{
			if ( !TheGameLogic->isInMultiplayerGame() )
			{
				Player *localPlayer = ThePlayerList->getLocalPlayer();
				Money *money = localPlayer->getMoney();
				money->deposit( 10000 );
				TheInGameUI->messageNoFormat( TheGameText->FETCH_OR_SUBSTITUTE("GUI:DebugAddCash", L"Add Cash") );
			}
			break;
		}

MSG_CHEAT_ADD_CASH is the only cheat case in this block that does not set disp = DESTROY_MESSAGE after acting. Without it the message continues propagating through the pipeline when not in multiplayer; all neighboring cases (MSG_CHEAT_INSTANT_BUILD, MSG_CHEAT_GIVE_ALL_SCIENCES, etc.) consistently destroy the message.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DebugIs mostly debug functionalityInputMinorSeverity: Minor < Major < Critical < Blocker

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions