From b074cac8748fa14d5f191530f826dcd276e0e3dd Mon Sep 17 00:00:00 2001 From: andreasw Date: Wed, 10 Jun 2026 20:16:18 +0200 Subject: [PATCH 1/2] fix selection issues (hopefully) --- .../Object/Contain/JumpjetContain.cpp | 38 ++++++++----------- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Contain/JumpjetContain.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Contain/JumpjetContain.cpp index 386ae89d548..77dc1d654ab 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Contain/JumpjetContain.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Contain/JumpjetContain.cpp @@ -35,7 +35,7 @@ #include "Common/RandomValue.h" #include "Common/ThingTemplate.h" #include "Common/Xfer.h" - +#include "Common/PlayerList.h" #include "GameLogic/AIPathfind.h" #include "GameLogic/Locomotor.h" #include "GameLogic/Module/AIUpdate.h" @@ -44,7 +44,7 @@ #include "GameLogic/Module/PhysicsUpdate.h" #include "GameLogic/Object.h" #include "GameLogic/PartitionManager.h" - +#include "GameClient/InGameUI.h" #include "GameClient/Drawable.h" @@ -293,27 +293,21 @@ void JumpjetContain::onRemoving(Object* rider) } else { - bool hasRallyPoint = false; - // Get the transport of the rider - Object* transport = TheGameLogic->findObjectByID(rider->getProducerID()); - if (transport) - { - // Get the building that produced the transport - Object* transportProducer = TheGameLogic->findObjectByID(transport->getProducerID()); - if (transportProducer) - { - // See if we need to set a rally point for the object being parachuted - ExitInterface* exitInterface = transportProducer->getObjectExitInterface(); - if (exitInterface && exitInterface->useSpawnRallyPoint()) - { - exitInterface->exitObjectViaDoor(rider, DOOR_1); - hasRallyPoint = true; - } - } - } + riderAI->aiIdle(CMD_FROM_AI); // become idle. + } + } - if (!hasRallyPoint) - riderAI->aiIdle(CMD_FROM_AI); // become idle. + if (rider->getControllingPlayer() == ThePlayerList->getLocalPlayer()) + { + Drawable* riderDraw = rider->getDrawable(); + if (riderDraw && riderDraw->isSelected()) + { + // add to the current selection (don't clobber other units, e.g. group jumpjet launches) + GameMessage* teamMsg = TheMessageStream->appendMessage(GameMessage::MSG_CREATE_SELECTED_GROUP); + teamMsg->appendBooleanArgument(FALSE); + teamMsg->appendObjectIDArgument(rider->getID()); + TheInGameUI->selectDrawable(riderDraw); + TheInGameUI->setDisplayedMaxWarning(FALSE); } } From fc0c002b4aeaee984925c25c968fb12b2d1b8afe Mon Sep 17 00:00:00 2001 From: andreasw Date: Thu, 11 Jun 2026 14:19:25 +0200 Subject: [PATCH 2/2] actually fixed jumpjet selection bug --- .../Source/GameLogic/Object/Contain/JumpjetContain.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Contain/JumpjetContain.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Contain/JumpjetContain.cpp index 77dc1d654ab..bfc8f3d2ff4 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Contain/JumpjetContain.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Contain/JumpjetContain.cpp @@ -297,17 +297,16 @@ void JumpjetContain::onRemoving(Object* rider) } } + // Reselect to avoid bug where it stays unresponsive if (rider->getControllingPlayer() == ThePlayerList->getLocalPlayer()) { Drawable* riderDraw = rider->getDrawable(); if (riderDraw && riderDraw->isSelected()) { - // add to the current selection (don't clobber other units, e.g. group jumpjet launches) - GameMessage* teamMsg = TheMessageStream->appendMessage(GameMessage::MSG_CREATE_SELECTED_GROUP); + // add to the current selection + GameMessage* teamMsg = TheMessageStream->appendMessage(GameMessage::MSG_CREATE_SELECTED_GROUP_NO_SOUND); teamMsg->appendBooleanArgument(FALSE); teamMsg->appendObjectIDArgument(rider->getID()); - TheInGameUI->selectDrawable(riderDraw); - TheInGameUI->setDisplayedMaxWarning(FALSE); } }