Skip to content

Commit af2e43a

Browse files
authored
Merge pull request #92 from Andreas-W/claude_fixes
jumpjet fixes
2 parents 763c773 + fc0c002 commit af2e43a

1 file changed

Lines changed: 15 additions & 22 deletions

File tree

GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Contain/JumpjetContain.cpp

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
#include "Common/RandomValue.h"
3636
#include "Common/ThingTemplate.h"
3737
#include "Common/Xfer.h"
38-
38+
#include "Common/PlayerList.h"
3939
#include "GameLogic/AIPathfind.h"
4040
#include "GameLogic/Locomotor.h"
4141
#include "GameLogic/Module/AIUpdate.h"
@@ -44,7 +44,7 @@
4444
#include "GameLogic/Module/PhysicsUpdate.h"
4545
#include "GameLogic/Object.h"
4646
#include "GameLogic/PartitionManager.h"
47-
47+
#include "GameClient/InGameUI.h"
4848
#include "GameClient/Drawable.h"
4949

5050

@@ -293,27 +293,20 @@ void JumpjetContain::onRemoving(Object* rider)
293293
}
294294
else
295295
{
296-
bool hasRallyPoint = false;
297-
// Get the transport of the rider
298-
Object* transport = TheGameLogic->findObjectByID(rider->getProducerID());
299-
if (transport)
300-
{
301-
// Get the building that produced the transport
302-
Object* transportProducer = TheGameLogic->findObjectByID(transport->getProducerID());
303-
if (transportProducer)
304-
{
305-
// See if we need to set a rally point for the object being parachuted
306-
ExitInterface* exitInterface = transportProducer->getObjectExitInterface();
307-
if (exitInterface && exitInterface->useSpawnRallyPoint())
308-
{
309-
exitInterface->exitObjectViaDoor(rider, DOOR_1);
310-
hasRallyPoint = true;
311-
}
312-
}
313-
}
296+
riderAI->aiIdle(CMD_FROM_AI); // become idle.
297+
}
298+
}
314299

315-
if (!hasRallyPoint)
316-
riderAI->aiIdle(CMD_FROM_AI); // become idle.
300+
// Reselect to avoid bug where it stays unresponsive
301+
if (rider->getControllingPlayer() == ThePlayerList->getLocalPlayer())
302+
{
303+
Drawable* riderDraw = rider->getDrawable();
304+
if (riderDraw && riderDraw->isSelected())
305+
{
306+
// add to the current selection
307+
GameMessage* teamMsg = TheMessageStream->appendMessage(GameMessage::MSG_CREATE_SELECTED_GROUP_NO_SOUND);
308+
teamMsg->appendBooleanArgument(FALSE);
309+
teamMsg->appendObjectIDArgument(rider->getID());
317310
}
318311
}
319312

0 commit comments

Comments
 (0)