Zero Hour rebuilt from EA's source: x64, Direct3D 11, VS2022/CMake, ~60 original bugs fixed, an AI that builds a base. Bring your own game.
C++ cmakecnccommand-and-conquercppdirectx11game-enginegame-preservationgeneralsrtssage-enginex64zero-hour
fix(gameengine): no selection box, cross cursor while a sweep is armed
Olcay Seygan800a6cc53500
diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cppindex 13ac8703e..176350987 100644--- a/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp@@ -6617,6 +6617,8 @@ void InGameUI::createCommandHint( const GameMessage *msg ){if( !drawSelectable && srcObj && srcObj->isLocallyControlled() && srcObj->isKindOf(KINDOF_STRUCTURE))setMouseCursor( Mouse::GENERIC_INVALID );+ else if( m_areaOrder != AREA_ORDER_NONE )+ setMouseCursor( Mouse::CROSS ); // a sweep circles the point whatever stands on it, own units includedelse if( drawSelectable && obj->isLocallyControlled() && !obj->isKindOf(KINDOF_MINE))setMouseCursor( Mouse::SELECTING );else if( TheRadar->isRadarWindow( window ) &&@@ -6624,7 +6626,7 @@ void InGameUI::createCommandHint( const GameMessage *msg )(TheRadar->isRadarHidden() ||ThePlayerList->getLocalPlayer()->hasRadar() == FALSE) )setMouseCursor( Mouse::ARROW );- else if( isGuardArmed() || m_areaOrder != AREA_ORDER_NONE )+ else if( isGuardArmed() )setMouseCursor( Mouse::CROSS ); // the targeting cross, the cursor EA's own guard button armselsesetMouseCursor( Mouse::MOVETO );diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/SelectionXlat.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/SelectionXlat.cppindex de5f9a394..c8cce3f5b 100644--- a/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/SelectionXlat.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/SelectionXlat.cpp@@ -430,9 +430,12 @@ GameMessageDisposition SelectionTranslator::translateGameMessage(const GameMessa}// with attack move or guard armed a left drag draws the order line over in CommandXlat, so- // no selection box grows under it- const Bool leftDrawsLine = TheInGameUI->isLineOrderArmed() && TheInGameUI->getSelectCount() > 0;- if (m_leftMouseButtonIsDown && !leftDrawsLine)+ // no selection box grows under it. Scout and search and destroy have no line to draw, and+ // their drag is no box either: the key stays armed for the click that aims it+ const Bool leftDragIsOrder = (TheInGameUI->isLineOrderArmed()+ || TheInGameUI->getAreaOrderArmed() != InGameUI::AREA_ORDER_NONE)+ && TheInGameUI->getSelectCount() > 0;+ if (m_leftMouseButtonIsDown && !leftDragIsOrder){ICoord2D delta;