Skip to content

Commit 8c156f6

Browse files
committed
Added additional check for selected drawables.
To avoid issues with fast deselection when the game's paused, or when the runahead is significant in multiplayer.
1 parent 4453191 commit 8c156f6

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3556,6 +3556,7 @@ void InGameUI::deselectDrawable( Drawable *draw )
35563556
void InGameUI::deselectAllDrawables( Bool updateGameLogic )
35573557
{
35583558
const DrawableList *selected = getAllSelectedDrawables();
3559+
const Bool emptyDrawableSelection = selected->empty();
35593560

35603561
// loop through all the selected drawables
35613562
for ( DrawableListCIt it = selected->begin(); it != selected->end(); )
@@ -3579,7 +3580,7 @@ void InGameUI::deselectAllDrawables( Bool updateGameLogic )
35793580
if (updateGameLogic)
35803581
{
35813582
// TheSuperHackers @tweak Avoid sending this message when no objects are currently selected.
3582-
if (!ThePlayerList->getLocalPlayer()->isCurrentlySelectedGroupEmpty())
3583+
if (!emptyDrawableSelection || !ThePlayerList->getLocalPlayer()->isCurrentlySelectedGroupEmpty())
35833584
{
35843585
// TheSuperHackers @tweak Originally this message had one boolean argument, but it wasn't used for anything.
35853586
TheMessageStream->appendMessage(GameMessage::MSG_DESTROY_SELECTED_GROUP);

0 commit comments

Comments
 (0)