Skip to content

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.

feat(gameclient): draw lines and the circle with the move button

Olcay Seygand75a3e674a60
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8e12d052b..36c295ef2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -354,7 +354,7 @@ found and fixed — EA's own, not port damage.**
- The three buttons are split cleanly now. Left selects, and only selects. A right click gives the order, and a right drag scrolls the map the way it did in 2003: the spot you pressed on stays put, and the further you pull away from it the faster the map runs. The drag only starts once the pointer has really travelled, so a click your hand wobbles a pixel or two is still an order and the camera does not twitch. A pan never throws away the building on your cursor or the power you were about to aim. The middle button turns the view, with no key held, and a middle click without a drag puts the camera back where it started. The wheel zooms toward whatever the cursor is over and the screen edges still scroll. The classic scheme, where left both selected and commanded and right scrolled and deselected, is gone rather than switched off, and the two checkboxes that used to choose between them are out of the options screen.
- How far the pointer travels before a click becomes a drag is yours to set. Drag Threshold on Options > Controls runs from 2 to 50 pixels, and the game's own value was 25. Raise it if selection boxes start by accident, lower it if your drags are read as clicks.
- An isometric camera, on Options > Controls. It looks at the battlefield from far off through a narrow lens, so a tank at the top of the screen is drawn the same size as one at the bottom and a base reads like a city-builder's plan instead of shrinking into the distance. It buys no extra sight. The normal camera's corners, edges and centre are laid over the isometric screen as closely as a flat picture allows, hills and ultrawide screens included: the normal camera still sees a little more at the far corners and the isometric one the same amount more at the near corners, because a perspective view is wider at the back than at the front and an isometric one is not. Pan across a ridge and the picture holds its size and its angle; it does not rise and dip with the ground under it. Campaign cinematics are filmed with the normal camera whatever the box says, and the isometric view comes back when the black bars go. They are shot from ten feet off the ground looking up at a rocket leaving its pad or a skyline, and the isometric camera turned each of those shots into a view from above of somewhere else: the picture lurched sideways every time the shot tilted, and a low shot ran off the edge of the map into a white screen. With the box ticked, USA 1's opening now plays the way it does without it. You still turn and zoom it the way you always did, and the box takes effect the moment you tick it, mid-match included.
-- Press V, or the move button, then drag the left button, or just hold Shift and drag, and you draw a line: the selection spreads itself evenly along it, in the order the units already stand, so a column arrives as a firing line instead of a queue. While you drag, it is drawn as a smooth curve through the points the order carries; it used to be a jagged chain of short straight pieces. It is the line you actually drew, curves and all, however far you keep drawing it: a long sweep used to give up partway through and finish as one straight run to the cursor, and now it holds its shape to the end. Letting go over the sidebar finishes the order rather than leaving the line stuck to the cursor. A line pulled up past the horizon into the sky ends where the ground does: the stretch over the sky used to land in one corner of the map, and the units whose stations fell on it walked off there. A soldier riding in a transport or sitting in a bunker gets no station on a move or attack-move line, as a plain click has always left him where he is, so the units that can walk share the whole line instead of leaving gaps where the riders were counted. Draw the line with the left button while attack move is armed and the whole line is an attack move: artillery spread across a front, each gun firing on what walks into it, instead of one clump on one spot. Guard draws the same way. Every line is drawn with the left button, the one armed orders are aimed with, and the right button never draws one: its drag is the camera. Without an order armed a left drag is the selection box it always was. Armed with attack instead, every unit fires on its own station along the line, which is a barrage laid across a ridge in one drag. `FormationDrag = no` in Options.ini turns the line off if you would rather an armed drag did nothing.
+- Press V, or the move button, then drag the left button, or just hold Shift and drag, and you draw a line: the selection spreads itself evenly along it, in the order the units already stand, so a column arrives as a firing line instead of a queue. While you drag, it is drawn as a smooth curve through the points the order carries; it used to be a jagged chain of short straight pieces. It is the line you actually drew, curves and all, however far you keep drawing it: a long sweep used to give up partway through and finish as one straight run to the cursor, and now it holds its shape to the end. Letting go over the sidebar finishes the order rather than leaving the line stuck to the cursor. A line pulled up past the horizon into the sky ends where the ground does: the stretch over the sky used to land in one corner of the map, and the units whose stations fell on it walked off there. A soldier riding in a transport or sitting in a bunker gets no station on a move or attack-move line, as a plain click has always left him where he is, so the units that can walk share the whole line instead of leaving gaps where the riders were counted. Draw the line with the left button while attack move is armed and the whole line is an attack move: artillery spread across a front, each gun firing on what walks into it, instead of one clump on one spot. Guard draws the same way. Every line, and the attack circle, is drawn with the button a click on the ground moves your units with. In the default mouse that is the left, and the right button's drag stays the camera. Under the Alternate Mouse Setup it is the right: a right drag with a key armed, Shift or Ctrl held draws the line or the circle, a plain right drag still scrolls the map, and the left drag is the selection box whatever is held. Without an order armed a left drag in the default mouse is the selection box it always was. Armed with attack instead, every unit fires on its own station along the line, which is a barrage laid across a ridge in one drag. `FormationDrag = no` in Options.ini turns the line off if you would rather an armed drag did nothing.
- Selected units draw a line to wherever they are going, and it looks like a building's rally point: EA's blue rally line, with the rally flag in your colour planted on the ground they are headed for. A selected factory shows that one flag at the rally you set; a second disc used to sit at the door as well, so the path around the building read as two destinations. Every order draws one: move, attack move, attack, force fire, ground fire, enter, dock, repair, heal, capture, hack, guard, a waypoint path. An order aimed at something rather than somewhere, a tank to kill, a building to shoot, take or climb into, a unit to guard, ends on the line's joint instead of a flag, a small disc sitting just over the target and riding along with it while it drives, so a flag never stands on a tank. A shift list runs one line through all its stops, a joint on each and the flag on the last bit of ground. With order lines on, that last point gets a joint under its flag as well, so the end of the line reads the same as every stop before it. Units standing together and headed the same way share one thread, from the middle of the knot to the middle of where they are going, so twenty tanks sent across the map draw one line instead of twenty laid on top of each other; a selection spread over the map draws one per knot, and a flank sent on its own still shows. An angry mob draws one thread for the whole mob, not one per rioter. An attack move and a shot at the ground both point at the spot you clicked: the attack move's thread used to wander off to whichever free ground each unit was steering for, and ground fire pointed at the middle of the nearest map cell. An attack move stays pink from start to finish, too. A unit that stopped to fight used to swing its thread onto the enemy it was fighting, and only swung it back to your destination once the enemy was dead. It is not a flash at the moment of the order: the line is asked of the unit every frame, so it lasts until the unit gets there, changes its mind or leaves your selection, and it shows on the formation line while you are still drawing it. A unit that has walked off the edge of the screen still draws its line, which is how you see where the half of your army you cannot see is headed. The animated ring the ground used to sprout wherever you clicked is gone: it flashed for a second and told you nothing the flag on the destination does not, and the flag stays for as long as the order does. Aircraft draw their thread from the click, not from the moment they leave the runway. A plane parked on its airfield answers an order by starting its takeoff and puts the order itself aside until the wheels are up, so the taxi and the climb, which is exactly the stretch where you are wondering whether the strike went out at all, used to show nothing.
- A unit standing guard draws its marker on the ground it is guarding. A guard order clears the unit's goal on the way in, so every guard marker used to sit in the bottom left corner of the map with a thread running the whole way across it, whatever the unit was actually watching.
- A is attack and D is attack move, each arming the next order click. A click on the ground with A held down is a shot at that ground, on your own tank a shot at your own tank, and the mode drops again the moment the order goes out, so nothing stays armed behind your back. The click keeps your group, too: an attack click that was not a drag used to run the same deselect an ordinary left click runs, so the order arrived a moment after the units it was meant for had been dropped. Both orders are aimed with the left button, the way a special power is, and a right click puts the key down again without giving any order. Holding ctrl no longer forces fire: A is the one way to shoot the ground, and ctrl on a move is only the shared pace. The two keys turn each other off, and the letters they took were sitting on grid commands that moved. With A armed, pointing at something nothing in your selection can shoot shows the game's can't-do-that pointer: a Sentry Drone before its gun is researched has no weapon at all, and the pointer used to look ready while the click did nothing.
diff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/CommandXlat.h b/GeneralsMD/Code/GameEngine/Include/GameClient/CommandXlat.h
index 404356733..3e21b5a92 100644
--- a/GeneralsMD/Code/GameEngine/Include/GameClient/CommandXlat.h
+++ b/GeneralsMD/Code/GameEngine/Include/GameClient/CommandXlat.h
@@ -70,8 +70,10 @@ private:
// one, otherwise only the right, and the anchor is wherever the drawing button went down.
Bool m_formationDragArmed;
Bool m_formationDragForceLine; ///< latched with it: the line was begun under the Force Attack hold and shift
+ Bool m_formationDragRight; ///< latched with it: the right button draws this line, so its release finishes it
ICoord2D m_formationDragAnchor;
+ void armFormationDrag( const ICoord2D& press, Bool rightButton );
void finishFormationDrag( const ICoord2D& lift );
GameMessage::Type createMoveToLocationMessage( Drawable *draw, const Coord3D *dest, CommandEvaluateType commandType );
diff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/InGameUI.h b/GeneralsMD/Code/GameEngine/Include/GameClient/InGameUI.h
index 372829f23..d36d4db24 100644
--- a/GeneralsMD/Code/GameEngine/Include/GameClient/InGameUI.h
+++ b/GeneralsMD/Code/GameEngine/Include/GameClient/InGameUI.h
@@ -1143,6 +1143,9 @@ public: // ********************************************************************
Bool isLineOrderArmed( void ) const { return m_attackMoveToMode || m_guardArmed || m_moveArmed; } ///< a left drag draws a move, attack move or guard line; force fire's left drag is the attack circle
Bool isForceLineHeld( void ) const; ///< the Force Attack hold with shift: a left drag draws the attack line, not the circle
Bool isMoveLineHeld( void ) const; ///< shift alone over a selection that can walk: a left drag draws the move line, not the box
+ Bool wantsDragLine( void ) const; ///< a drag of the order button now draws an order line
+ Bool wantsDragCircle( void ) const; ///< a drag of the order button now draws the attack circle
+ Bool isOrderDragButton( Bool rightButton ) const; ///< lines and circles are drawn with the button that gives the move order
// zeroing the repeat clock makes the first quantized step happen on the very next update, so a
// tap of the key is one eighth and a hold is one eighth every CAMERA_SNAP_REPEAT_MS.
diff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/SelectionXlat.h b/GeneralsMD/Code/GameEngine/Include/GameClient/SelectionXlat.h
index 1a797ffc8..503390788 100644
--- a/GeneralsMD/Code/GameEngine/Include/GameClient/SelectionXlat.h
+++ b/GeneralsMD/Code/GameEngine/Include/GameClient/SelectionXlat.h
@@ -49,6 +49,7 @@ private:
Bool m_leftMouseButtonIsDown;
Bool m_dragSelecting;
+ Bool m_circleOnRight; ///< the attack circle being drawn belongs to the right button, where that is the move button (fork)
Bool m_leftDragIsLine; ///< latched at the press: this left drag draws an order line, so no box grows (fork)
Bool m_dragOrderJustIssued; ///< an attack circle or a left-drawn order line just went out, so eat the click that ends it (fork)
UnsignedInt m_lastGroupSelTime;
diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp
index 9151d91f3..e6a288be0 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp
@@ -4976,6 +4976,29 @@ Bool InGameUI::isForceLineHeld( void ) const
return m_forceAttackMode && !isLineOrderArmed() && TheKeyboard->isShift();
}
+//-------------------------------------------------------------------------------------------------
+Bool InGameUI::wantsDragLine( void ) const
+{
+ return isLineOrderArmed() || isForceLineHeld() || isMoveLineHeld();
+}
+
+//-------------------------------------------------------------------------------------------------
+Bool InGameUI::wantsDragCircle( void ) const
+{
+ return isForceFireOn() && !isLineOrderArmed() && !isForceLineHeld() && m_selectCount > 0
+ && getGUICommand() == NULL && m_pendingPlaceType == NULL;
+}
+
+//-------------------------------------------------------------------------------------------------
+/** Every line and the circle are drawn with the button a click on the ground moves with: the left
+ * in the default Classic mouse, the right under the Alternate Mouse Setup and the Reforged mouse.
+ * The other button keeps its drag: the selection box on the left, the camera pan on the right. */
+//-------------------------------------------------------------------------------------------------
+Bool InGameUI::isOrderDragButton( Bool rightButton ) const
+{
+ return rightButton ? TheGlobalData->rightButtonOrders() : TheGlobalData->leftButtonOrders();
+}
+
//-------------------------------------------------------------------------------------------------
/** Shift with no key armed draws the move line, the one V draws, when something selected of yours
* can walk it. With nothing that walks selected there is no line to draw and shift's drag stays
diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp
index 1d1a0aef1..53f6e707b 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp
@@ -1456,7 +1456,8 @@ CommandTranslator::CommandTranslator() :
m_mouseRightDown(0),
m_mouseRightUp(0),
m_formationDragArmed(FALSE),
- m_formationDragForceLine(FALSE)
+ m_formationDragForceLine(FALSE),
+ m_formationDragRight(FALSE)
{
m_mouseRightDragAnchor.x = 0;
m_mouseRightDragAnchor.y = 0;
@@ -1477,6 +1478,17 @@ CommandTranslator::~CommandTranslator()
* line becomes the order its armed mode names; one that never did was a click, and the click
* message behind this release gives that order instead.
*/
+void CommandTranslator::armFormationDrag( const ICoord2D& press, Bool rightButton )
+{
+ if( !TheInGameUI->wantsDragLine() )
+ return;
+ m_formationDragAnchor = press;
+ m_formationDragArmed = isFormationDragArmed();
+ m_formationDragForceLine = TheInGameUI->isForceLineHeld();
+ m_formationDragRight = rightButton;
+}
+
+//-------------------------------------------------------------------------------------------------
void CommandTranslator::finishFormationDrag( const ICoord2D& lift )
{
const Bool wasDrag = TheInGameUI->isFormationDragging();
@@ -4096,32 +4108,31 @@ GameMessageDisposition CommandTranslator::translateGameMessage(const GameMessage
m_mouseRightDragAnchor = msg->getArgument( 0 )->pixel;
m_mouseRightDown = (UnsignedInt) msg->getArgument( 2 )->integer;
- // a right drag pans the camera (LookAtXlat) and never draws a formation line
+ // a plain right drag pans the camera (LookAtXlat). Where the right button gives the move
+ // order, a drag with a line wanted draws the line instead, and LookAtXlat leaves it alone
+ if( TheInGameUI->isOrderDragButton( TRUE ) )
+ armFormationDrag( msg->getArgument( 0 )->pixel, TRUE );
break;
}
//-----------------------------------------------------------------------------
- // A formation line is drawn with the left button, and only once the move, attack move or guard
- // key is armed: a left drag without one is a selection box. The attack key and the Force
- // Attack hold keep their left drag for the attack circle; shift on the hold draws the attack
- // line here instead, aimed at the enemies near it. Shift alone draws the move line.
+ // A formation line is drawn with the button that gives the move order, the left one in the
+ // default mouse, and only once the move, attack move or guard key is armed: a drag without one
+ // is a selection box. The attack key and the Force Attack hold keep their drag for the attack
+ // circle; shift on the hold draws the attack line here instead, aimed at the enemies near it.
+ // Shift alone draws the move line.
case GameMessage::MSG_RAW_MOUSE_LEFT_DOUBLE_CLICK:
case GameMessage::MSG_RAW_MOUSE_LEFT_BUTTON_DOWN:
{
- const Bool forceLine = TheInGameUI->isForceLineHeld();
- if( TheInGameUI->isLineOrderArmed() || forceLine || TheInGameUI->isMoveLineHeld() )
- {
- m_formationDragAnchor = msg->getArgument( 0 )->pixel;
- m_formationDragArmed = isFormationDragArmed();
- m_formationDragForceLine = forceLine;
- }
+ if( TheInGameUI->isOrderDragButton( FALSE ) )
+ armFormationDrag( msg->getArgument( 0 )->pixel, FALSE );
break;
}
//-----------------------------------------------------------------------------
case GameMessage::MSG_RAW_MOUSE_LEFT_BUTTON_UP:
{
- if( m_formationDragArmed )
+ if( m_formationDragArmed && !m_formationDragRight )
finishFormationDrag( msg->getArgument( 0 )->pixel );
break;
}
@@ -4157,6 +4168,11 @@ GameMessageDisposition CommandTranslator::translateGameMessage(const GameMessage
m_mouseRightDragLift = msg->getArgument( 0 )->pixel;
m_mouseRightUp = (UnsignedInt) msg->getArgument( 2 )->integer;
+ // a line drawn with the right button. A drag is never a click, so the right click behind
+ // this release gives no order of its own
+ if( m_formationDragArmed && m_formationDragRight )
+ finishFormationDrag( m_mouseRightDragLift );
+
// a structure waiting to be placed is dropped by the same release, over in
// SelectionXlat, unless the release ended a pan. The Classic mouse drops it here on a click,
// as 1.04 did, which is also what takes a shortcut bar's sneak attack off the cursor.
diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/LookAtXlat.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/LookAtXlat.cpp
index dd57fe5c9..7e7070d26 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/LookAtXlat.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/LookAtXlat.cpp
@@ -352,6 +352,15 @@ GameMessageDisposition LookAtTranslator::translateGameMessage(const GameMessage
m_lastMouseMoveFrame = TheGameLogic->getFrame();
m_anchor = msg->getArgument( 0 )->pixel;
+ // where the right button gives the move order it also draws the order lines and the attack
+ // circle (CommandXlat, SelectionXlat), and a drag that draws one does not pan as well
+ if( TheInGameUI->isOrderDragButton( TRUE )
+ && ( TheInGameUI->wantsDragLine() || TheInGameUI->wantsDragCircle() ) )
+ {
+ m_rightPanArmed = false;
+ break;
+ }
+
// the Classic mouse is 1.04's scroll, which starts on the press itself, so a click that
// wobbles nudges the camera. Its second press of a quick pair started nothing, as there.
if (TheGlobalData->isClassicMouse())
diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/SelectionXlat.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/SelectionXlat.cpp
index bae987497..03e9a570f 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/SelectionXlat.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/SelectionXlat.cpp
@@ -303,6 +303,7 @@ SelectionTranslator::SelectionTranslator()
{
m_leftMouseButtonIsDown = FALSE;
m_dragSelecting = FALSE;
+ m_circleOnRight = FALSE;
m_leftDragIsLine = FALSE;
m_dragOrderJustIssued = FALSE;
m_lastGroupSelTime = 0;
@@ -455,11 +456,9 @@ GameMessageDisposition SelectionTranslator::translateGameMessage(const GameMessa
break;
}
- // with attack move or guard armed a left drag draws the order line over in CommandXlat, so
- // no selection box grows under it, whichever mouse is set. A drag with no key armed is the box
- const Bool leftDragIsOrder = ( TheInGameUI->isLineOrderArmed() || m_leftDragIsLine
- || TheInGameUI->isFormationDragging() )
- && TheInGameUI->getSelectCount() > 0;
+ // a left drag that draws an order line over in CommandXlat grows no selection box under it.
+ // A drag with no line wanted, or with the right button drawing the lines, is the box
+ const Bool leftDragIsOrder = m_leftDragIsLine && TheInGameUI->getSelectCount() > 0;
if (m_leftMouseButtonIsDown && !leftDragIsOrder)
{
ICoord2D delta;
@@ -1104,19 +1103,20 @@ GameMessageDisposition SelectionTranslator::translateGameMessage(const GameMessa
m_leftMouseButtonIsDown = true;
m_selectFeedbackAnchor = msg->getArgument( 0 )->pixel;
- // the line keys are asked again on every move; the two holds are latched here, the same
- // moment CommandXlat latches the line, so letting go of shift mid-drag cannot grow a box
- // under a line that is already being drawn
- m_leftDragIsLine = TheInGameUI->isForceLineHeld() || TheInGameUI->isMoveLineHeld();
+ // latched here, the same moment CommandXlat latches the line, so letting go of shift
+ // mid-drag cannot grow a box under a line that is already being drawn. Lines and the circle
+ // belong to the button that moves; where that is the right one, the left drag is the box
+ m_leftDragIsLine = TheInGameUI->isOrderDragButton( FALSE ) && TheInGameUI->wantsDragLine();
- // with the attack key armed or the Force Attack hold down the left button draws a circle
+ // with the attack key armed or the Force Attack hold down the button draws a circle
// instead of a selection box, and everything hostile inside it becomes a target list. An
// armed line key (move, attack move, guard) keeps its line under the hold, and shift on top
// of the hold draws the attack line over in CommandXlat instead.
- if( TheInGameUI->isForceFireOn() && !TheInGameUI->isLineOrderArmed() && !TheInGameUI->isForceLineHeld()
- && TheInGameUI->getSelectCount() > 0
- && TheInGameUI->getGUICommand() == NULL && TheInGameUI->getPendingPlaceType() == NULL )
+ if( TheInGameUI->isOrderDragButton( FALSE ) && TheInGameUI->wantsDragCircle() )
+ {
TheInGameUI->beginAttackCircle( m_selectFeedbackAnchor );
+ m_circleOnRight = FALSE;
+ }
break;
}
@@ -1130,7 +1130,7 @@ GameMessageDisposition SelectionTranslator::translateGameMessage(const GameMessa
// the circle is finished on the same button that drew it: the targets go out here, and the
// click that follows this release has to be eaten or it would reselect under the anchor
- if( TheInGameUI->isAttackCircling() )
+ if( TheInGameUI->isAttackCircling() && !m_circleOnRight )
{
// a circle Ctrl started belongs to no key: undragged, the press was an ordinary Ctrl click
const Bool keyed = TheInGameUI->isOrderKeyArmed() || TheInGameUI->getGUICommand() != NULL;
@@ -1158,7 +1158,7 @@ GameMessageDisposition SelectionTranslator::translateGameMessage(const GameMessa
// a left drag that drew an attack move, guard or attack line is turned into its order by
// CommandXlat, which sees this release next. The click behind the release would select
// whatever sat under it and drop the group the line was drawn for
- if( TheInGameUI->isFormationDragging() )
+ if( m_leftDragIsLine && TheInGameUI->isFormationDragging() )
{
m_dragOrderJustIssued = TRUE;
break;
@@ -1217,12 +1217,31 @@ GameMessageDisposition SelectionTranslator::translateGameMessage(const GameMessa
m_deselectFeedbackAnchor = msg->getArgument( 0 )->pixel;
m_lastClick = (UnsignedInt) msg->getArgument( 2 )->integer;
TheTacticalView->getPosition( &m_deselectDownCameraPosition );
+
+ // where the right button moves, it draws the attack circle as well (LookAtXlat holds its pan)
+ if( TheInGameUI->isOrderDragButton( TRUE ) && TheInGameUI->wantsDragCircle() )
+ {
+ TheInGameUI->beginAttackCircle( m_deselectFeedbackAnchor );
+ m_circleOnRight = TRUE;
+ }
break;
}
//-----------------------------------------------------------------------------
case GameMessage::MSG_RAW_MOUSE_RIGHT_BUTTON_UP:
{
+ // a circle drawn with the right button goes out on its release. A circle that was never
+ // dragged was a right click, which falls through to what a right click does under force fire
+ if( m_circleOnRight && TheInGameUI->isAttackCircling() )
+ {
+ m_circleOnRight = FALSE;
+ if( TheInGameUI->issueAttackCircle() )
+ {
+ TheInGameUI->spendOrderKey();
+ break;
+ }
+ }
+
// Classic is 1.04's right release. Only a click counts: the press is the scroll as well
// (LookAtXlat), so a release that travelled, was held, or rode the camera too far is not one.
// The click takes back a waiting GUI command and nothing else, and eats the release, which