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(gameengine): remove the scout order key

Olcay Seygan1c36df67d729
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f4f6b2427..149b35bd1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -284,7 +284,7 @@ found and fixed — EA's own, not port damage.**
- Campaign reinforcements flown in by Chinook land again. That one-at-a-time unloading sent a mission's scripted Chinooks home with their cargo still aboard, so on the second American mission the dozers announced at the docks never got off, and neither did the next one.
- A guarding unit no longer fights itself between returning to post and shooting back.
- Guard covers the circle you choose. How far a guard reached used to come from each unit's own eyesight, so Rangers and Missile Defenders posted on the same spot held circles of 180 and 270 and a raider standing between the two was only shot by half the group. Now one guard order gives the whole group one circle, the widest any of them had. Roll the mouse wheel while the guard key or the guard button is armed and the circle grows or shrinks before you click, drawn on the ground under the pointer as you go. Select a guarding group and its circle is drawn round the post, and every unit of yours on guard carries a small steel shield over its head, selected or not, in place of the blocky "G" it used to wear.
-- Two new orders on the command bar. Search and destroy, on F, sends the group round a circle you pick with the wheel, fighting everything it meets on the way, and leaves it guarding that circle when the lap is done. Scout, on G, walks the same lap without stopping to fight and brings the group back to the middle. The lap starts on the side the group is coming from and skips ground you can already see. Scout is offered to the units built to look around: Humvees, Pathfinders, Listening Outposts, Technicals, Combat Bikes and Radar Vans. Where those letters are taken by a unit's own buttons the keys move to the next free place, and a card says which is which when you point at them.
+- Search and destroy, a new order on F, sends the group round a circle you pick with the wheel, fighting everything it meets on the way, and leaves it guarding that circle when the lap is done. The lap starts on the side the group is coming from and skips ground you can already see. Where F is taken by a unit's own buttons the key moves to the next free place, and a card says what it does when you point at it.
- H now sets a stance for the group. Defensive is how your units have always behaved: they fire on what comes into range and stay put. Aggressive lets them go after anything they can see, the way the computer's own units do, so a group left on aggressive clears the ground around it without being told. The button shows the stance the selection holds.
- A queued attack move finishes its fights before the next order on the list goes out. The first enemy it met used to count as arriving, so a list of attack moves round a town skipped ahead a step at every skirmish and the group was off to the last point while the first was still contested. Replays recorded before this version play back differently.
- A unit sent out to answer a shot, whose target then died, is supposed to walk home. When that walk cannot start, because the unit cannot move or the pathfinder has no way back, the failure was taken to mean someone was still in range, and the unit went back into the attack on a target that was already gone. Both ends of that attack find nobody and hand it back to the walk, which fails again, so the loop runs out inside the same step and starts over on the next one. One match wrote 67,416 lines about it, and every line is pushed out to disk as it is written. The failed walk now counts as the walk being over. The unit looks once more, and with nobody there it goes back to what it was doing. A save that caught the chase dropped it on load; it picks the target back up. A soldier whose tunnel is gone did the same thing, and a computer match wrote 80 of those lines. With no tunnel he waits and looks. A replay recorded before this change plays back differently.
diff --git a/GeneralsMD/Code/Data/Art/Textures/ReforgedOrders.tga b/GeneralsMD/Code/Data/Art/Textures/ReforgedOrders.tga
index d8786864b..6e5659e9d 100644
Binary files a/GeneralsMD/Code/Data/Art/Textures/ReforgedOrders.tga and b/GeneralsMD/Code/Data/Art/Textures/ReforgedOrders.tga differ
diff --git a/GeneralsMD/Code/Data/INI/BalanceReforged.ini b/GeneralsMD/Code/Data/INI/BalanceReforged.ini
index 6469b0091..6d4d8f244 100644
--- a/GeneralsMD/Code/Data/INI/BalanceReforged.ini
+++ b/GeneralsMD/Code/Data/INI/BalanceReforged.ini
@@ -523,169 +523,6 @@ Object Tank_ChinaTankOverlordGattlingCannon
End
End
-; ---- scouts ------------------------------------------------------------------------------------
-; The command bar offers the scout key to a selection with one of these in it. SCOUT changes
-; nothing else about the unit.
-
-Object AmericaVehicleHumvee
- KindOf = +SCOUT
-End
-
-Object AirF_AmericaVehicleHumvee
- KindOf = +SCOUT
-End
-
-Object Lazr_AmericaVehicleHumvee
- KindOf = +SCOUT
-End
-
-Object SupW_AmericaVehicleHumvee
- KindOf = +SCOUT
-End
-
-Object AmericaInfantryPathfinder
- KindOf = +SCOUT
-End
-
-Object AirF_AmericaInfantryPathfinder
- KindOf = +SCOUT
-End
-
-Object Lazr_AmericaInfantryPathfinder
- KindOf = +SCOUT
-End
-
-Object SupW_AmericaInfantryPathfinder
- KindOf = +SCOUT
-End
-
-Object Boss_InfantryPathfinder
- KindOf = +SCOUT
-End
-
-Object ChinaVehicleListeningOutpost
- KindOf = +SCOUT
-End
-
-Object Infa_ChinaVehicleListeningOutpost
- KindOf = +SCOUT
-End
-
-Object Nuke_ChinaVehicleListeningOutpost
- KindOf = +SCOUT
-End
-
-Object Tank_ChinaVehicleListeningOutpost
- KindOf = +SCOUT
-End
-
-; A Technical is built as one of three chassis, and the second and third are copies of the first
-; made before this file loads, so each chassis takes the line itself.
-
-Object GLAVehicleTechnicalChassisOne
- KindOf = +SCOUT
-End
-
-Object GLAVehicleTechnicalChassisTwo
- KindOf = +SCOUT
-End
-
-Object GLAVehicleTechnicalChassisThree
- KindOf = +SCOUT
-End
-
-Object Chem_GLAVehicleTechnicalChassisOne
- KindOf = +SCOUT
-End
-
-Object Chem_GLAVehicleTechnicalChassisTwo
- KindOf = +SCOUT
-End
-
-Object Chem_GLAVehicleTechnicalChassisThree
- KindOf = +SCOUT
-End
-
-Object Demo_GLAVehicleTechnicalChassisOne
- KindOf = +SCOUT
-End
-
-Object Demo_GLAVehicleTechnicalChassisTwo
- KindOf = +SCOUT
-End
-
-Object Demo_GLAVehicleTechnicalChassisThree
- KindOf = +SCOUT
-End
-
-Object Slth_GLAVehicleTechnicalChassisOne
- KindOf = +SCOUT
-End
-
-Object Slth_GLAVehicleTechnicalChassisTwo
- KindOf = +SCOUT
-End
-
-Object Slth_GLAVehicleTechnicalChassisThree
- KindOf = +SCOUT
-End
-
-Object GC_Slth_GLAVehicleTechnicalChassisOne
- KindOf = +SCOUT
-End
-
-Object GC_Slth_GLAVehicleTechnicalChassisTwo
- KindOf = +SCOUT
-End
-
-Object GC_Slth_GLAVehicleTechnicalChassisThree
- KindOf = +SCOUT
-End
-
-Object GLAVehicleCombatBike
- KindOf = +SCOUT
-End
-
-Object Chem_GLAVehicleCombatBike
- KindOf = +SCOUT
-End
-
-Object Demo_GLAVehicleCombatBike
- KindOf = +SCOUT
-End
-
-Object Slth_GLAVehicleCombatBike
- KindOf = +SCOUT
-End
-
-Object GC_Slth_GLAVehicleCombatBike
- KindOf = +SCOUT
-End
-
-Object GLAVehicleRadarVan
- KindOf = +SCOUT
-End
-
-Object Chem_GLAVehicleRadarVan
- KindOf = +SCOUT
-End
-
-Object Demo_GLAVehicleRadarVan
- KindOf = +SCOUT
-End
-
-Object Slth_GLAVehicleRadarVan
- KindOf = +SCOUT
-End
-
-Object GC_Chem_GLAVehicleRadarVan
- KindOf = +SCOUT
-End
-
-Object GC_Slth_GLAVehicleRadarVan
- KindOf = +SCOUT
-End
-
; ---- tanks and cars build up speed and brake for it ----------------------------------------------
;
; EA gave these Acceleration and Braking of 1000 (their own first numbers are still in the comments
diff --git a/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedOrders.ini b/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedOrders.ini
index 67727a38f..286a596f5 100644
--- a/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedOrders.ini
+++ b/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedOrders.ini
@@ -1,4 +1,4 @@
-; The command bar's attack, hold position, move, scout, search and destroy and stance cameos, painted
+; The command bar's attack, hold position, move, search and destroy and stance cameos, painted
; by Tools/order_cameos.py into Art/Textures/ReforgedOrders.tga. ControlBar.html draws them on the
; page's order keys. Mapped images are not in the multiplayer INI checksum.
@@ -26,14 +26,6 @@ MappedImage ReforgedOrderMove
Status = NONE
End
-MappedImage ReforgedOrderScout
- Texture = ReforgedOrders.tga
- TextureWidth = 256
- TextureHeight = 128
- Coords = Left:64 Top:64 Right:124 Bottom:112
- Status = NONE
-End
-
MappedImage ReforgedOrderHunt
Texture = ReforgedOrders.tga
TextureWidth = 256
diff --git a/GeneralsMD/Code/Data/Patch.str b/GeneralsMD/Code/Data/Patch.str
index 266042227..bda85fde8 100644
--- a/GeneralsMD/Code/Data/Patch.str
+++ b/GeneralsMD/Code/Data/Patch.str
@@ -220,14 +220,6 @@ GUI:OrderMoveDescription
"The next click on the ground sends the selected units there. Drag instead and they spread out along the line you draw."
END
-GUI:OrderScout
-"Scout"
-END
-
-GUI:OrderScoutDescription
-"Click a spot and the selected units walk a circle round it, looking at every part of it you cannot see yet, then come back to the middle. Roll the mouse wheel before you click to make the circle bigger or smaller."
-END
-
GUI:OrderSearchAndDestroy
"Search and Destroy"
END
diff --git a/GeneralsMD/Code/Data/Scenarios/sweep.txt b/GeneralsMD/Code/Data/Scenarios/sweep.txt
index 7f34fbdd9..166c3edd3 100644
--- a/GeneralsMD/Code/Data/Scenarios/sweep.txt
+++ b/GeneralsMD/Code/Data/Scenarios/sweep.txt
@@ -1,15 +1,12 @@
-# Do the scout and search and destroy keys cover the circle they are given?
+# Does the search and destroy key cover the circle it is given?
#
-# Search and destroy: two Crusaders west of a circle of 450 round 900,700, with an unarmed worker on
+# Two Crusaders west of a circle of 450 round 900,700, with an unarmed worker on
# the circle's ring at its north and its south. The verb hands the order queue the messages the key
# sends, an attack move to each point of the ring and a guard of the circle at the end, so both
# workers should die. Beside it, two more Crusaders given a plain attack move to the middle of the
# same kind of circle round 1450,1300 stop there: the ring is 315 out, past the 225 an attack move
# looks, so both of their workers should still be standing.
#
-# Scout: a Humvee walks a circle of 400 round 1500,300 and comes back to its middle, which the arrive
-# line times. The log names every point it was given.
-#
# generals.exe -headless -quickstart -noshellmap -observer -multiInstance -noFPSLimit
# -randommap 1 2 small -autoskirmish 2 -takeover
# -side 0 FactionAmerica -side 1 FactionGLA -seed 1 -maxframes 6000
@@ -25,12 +22,8 @@
30 spawn 1 Chem_GLAInfantryWorker 1 1450 985
30 spawn 1 Chem_GLAInfantryWorker 1 1450 1615
-30 spawn 0 AmericaVehicleHumvee 1 1200 500
-
60 hunt 0 AmericaTankCrusader 900 700 450
60 playerattackmove 0 SupW_AmericaTankCrusader 1450 1300
-60 scout 0 AmericaVehicleHumvee 1500 300 400
-61 arrive 0 AmericaVehicleHumvee 1500 300 60
61 tally 1 GLAInfantryWorker
61 tally 1 Chem_GLAInfantryWorker
diff --git a/GeneralsMD/Code/Data/Turkish/Generals.str b/GeneralsMD/Code/Data/Turkish/Generals.str
index 026a1ff79..77a8da1e5 100644
--- a/GeneralsMD/Code/Data/Turkish/Generals.str
+++ b/GeneralsMD/Code/Data/Turkish/Generals.str
@@ -14825,14 +14825,6 @@ GUI:OrderMoveDescription
"Zemine bir sonraki tıklama seçili birlikleri oraya gönderir. Bunun yerine sürüklerseniz birlikler çizdiğiniz çizgi boyunca dizilir."
END
-GUI:OrderScout
-"Keşif"
-END
-
-GUI:OrderScoutDescription
-"Bir noktaya tıklayın; seçili birlikler çevresinde bir daire boyunca dolaşıp dairenin henüz göremediğiniz her yerine bakar, sonra ortaya döner. Daireyi büyütmek ya da küçültmek için tıklamadan önce fare tekerleğini çevirin."
-END
-
GUI:OrderSearchAndDestroy
"Ara ve Yok Et"
END
diff --git a/GeneralsMD/Code/Data/Window/Html/ControlBar.html b/GeneralsMD/Code/Data/Window/Html/ControlBar.html
index 84bdb77d1..0c06b2cc8 100644
--- a/GeneralsMD/Code/Data/Window/Html/ControlBar.html
+++ b/GeneralsMD/Code/Data/Window/Html/ControlBar.html
@@ -51,9 +51,8 @@
{{holdkey.x}} ... stand, data-click="order:attack", "order:hold" and "order:move", for a
{{movekey.x}} ... selection that attack moves; no command set has a button for any of
them. The game letters each with the key bound to its place
- {{scoutkey.x}} ... the scout, search and destroy and stance keys, data-click="order:scout",
- {{huntkey.x}} ... "order:hunt" and "order:stance", wherever the grid has room for them;
- {{stancekey.x}} ... {{stance}} is "aggressive" or "defensive", the first selected unit's
+ {{huntkey.x}} ... the search and destroy and stance keys, data-click="order:hunt" and
+ {{stancekey.x}} ... "order:stance", wherever the grid has room for them; {{stance}} is "aggressive" or "defensive", the first selected unit's
data-each="portraitcells" the selection's cells, the portrait's first and then only what it
holds, each {{cell.x}} .y .w .h
{{selinfo.x}} ... beside a lone unit's portrait: {{sel.name}}, data-each="selstars" a star
@@ -300,7 +299,6 @@
.order.attack { background-image: url(ReforgedOrderAttack); }
.order.hold { background-image: url(ReforgedOrderHold); }
.order.move { background-image: url(ReforgedOrderMove); }
- .order.scout { background-image: url(ReforgedOrderScout); }
.order.hunt { background-image: url(ReforgedOrderHunt); }
.order.aggressive { background-image: url(ReforgedOrderAggressive); }
.order.defensive { background-image: url(ReforgedOrderDefensive); }
@@ -435,7 +433,6 @@
<div class="piece order attack {{attackkey.shown}}" data-click="order:attack" style="left: {{attackkey.x}}px; top: {{attackkey.y}}px; width: {{attackkey.w}}px; height: {{attackkey.h}}px"><div class="glow"></div></div>
<div class="piece order hold {{holdkey.shown}}" data-click="order:hold" style="left: {{holdkey.x}}px; top: {{holdkey.y}}px; width: {{holdkey.w}}px; height: {{holdkey.h}}px"><div class="glow"></div></div>
<div class="piece order move {{movekey.shown}}" data-click="order:move" style="left: {{movekey.x}}px; top: {{movekey.y}}px; width: {{movekey.w}}px; height: {{movekey.h}}px"><div class="glow"></div></div>
- <div class="piece order scout {{scoutkey.shown}}" data-click="order:scout" style="left: {{scoutkey.x}}px; top: {{scoutkey.y}}px; width: {{scoutkey.w}}px; height: {{scoutkey.h}}px"><div class="glow"></div></div>
<div class="piece order hunt {{huntkey.shown}}" data-click="order:hunt" style="left: {{huntkey.x}}px; top: {{huntkey.y}}px; width: {{huntkey.w}}px; height: {{huntkey.h}}px"><div class="glow"></div></div>
<div class="piece order {{stance}} {{stancekey.shown}}" data-click="order:stance" style="left: {{stancekey.x}}px; top: {{stancekey.y}}px; width: {{stancekey.w}}px; height: {{stancekey.h}}px"><div class="glow"></div></div>
diff --git a/GeneralsMD/Code/GameEngine/Include/Common/DrawnPath.h b/GeneralsMD/Code/GameEngine/Include/Common/DrawnPath.h
index 671db5ed2..958fac7dd 100644
--- a/GeneralsMD/Code/GameEngine/Include/Common/DrawnPath.h
+++ b/GeneralsMD/Code/GameEngine/Include/Common/DrawnPath.h
@@ -93,7 +93,7 @@ extern void orderAroundPoint( std::vector<AttackAssignSlot>& slots, Real centerX
/// Either side empty writes nothing.
extern void assignAttacks( Int attackerCount, Int targetCount, std::vector<AttackAssignPair>& pairs );
-/// The points the scout and search and destroy keys walk round the circle the player put down:
+/// The points the search and destroy key walks round the circle the player put down:
/// on a ring at seven tenths of the radius, four on a small circle and up to eight on a wide one,
/// the first the one facing (fromX, fromY), where the selection stands, and the rest going round
/// clockwise. Each is held inside lo..hi. The ground height is not filled in.
diff --git a/GeneralsMD/Code/GameEngine/Include/Common/KindOf.h b/GeneralsMD/Code/GameEngine/Include/Common/KindOf.h
index 5b7d17662..f37356585 100644
--- a/GeneralsMD/Code/GameEngine/Include/Common/KindOf.h
+++ b/GeneralsMD/Code/GameEngine/Include/Common/KindOf.h
@@ -173,7 +173,6 @@ enum KindOfType : int
KINDOF_CONSERVATIVE_BUILDING, ///< Conservative structures aren't considered part of your base for sneak attack boundary calculations...
KINDOF_IGNORE_DOCKING_BONES, ///< Structure will not look up docking bones. Patch 1.03 hack.
KINDOF_NO_ATTACK_WARNING, ///< Damage to this raises no "under attack" alarm, ping or EVA line.
- KINDOF_SCOUT, ///< A reconnaissance unit: the command bar offers it the scout key (fork)
KINDOF_COUNT // total number of kindofs
diff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/ControlBar.h b/GeneralsMD/Code/GameEngine/Include/GameClient/ControlBar.h
index 0543023db..7fee2fa62 100644
--- a/GeneralsMD/Code/GameEngine/Include/GameClient/ControlBar.h
+++ b/GeneralsMD/Code/GameEngine/Include/GameClient/ControlBar.h
@@ -495,18 +495,17 @@ Bool ControlBar_commandPlaces( const Int *types, const Int *groups, const Int *p
/** The page's keys past attack, hold position and move, which no command set has a button for either. */
enum OrderKeyExtra
{
- ORDER_KEY_SCOUT = 0, ///< walk a circle, for a selection with a scout in it
- ORDER_KEY_HUNT, ///< search and destroy: attack move round a circle and guard it, for one that attack moves
+ ORDER_KEY_HUNT = 0, ///< search and destroy: attack move round a circle and guard it, for one that attack moves
ORDER_KEY_STANCE, ///< aggressive or defensive, for one that attack moves
ORDER_KEY_EXTRAS
};
/** Where the ORDER_KEY_EXTRAS keys stand once `count` slots are at `places` (ControlBar_commandPlaces'
* answer, `fights` its return), or -1 for a key that is not offered or finds no room. They come
- * after every button, so none of them moves one. Each has its own place, scout G, search and
- * destroy F and the stance H; one that finds its own taken goes on B, then N, then the first free
- * place in reading order. */
-void ControlBar_orderKeyPlaces( const Int *places, Int count, Bool fights, Bool scouts, Int *keys );
+ * after every button, so none of them moves one. Each has its own place, search and destroy F
+ * and the stance H; one that finds its own taken goes on B, then N, then the first free place in
+ * reading order. */
+void ControlBar_orderKeyPlaces( const Int *places, Int count, Bool fights, Int *keys );
enum { MAX_RIGHT_HUD_UPGRADE_CAMEOS = 5};
enum { MAX_MULTI_SELECT_GROUPS = 36 }; ///< unit types a multi-selection tells apart (6x6 grid, Tab focus)
enum {
@@ -859,7 +858,7 @@ public:
attack and hold places hold the page's two orders. `places` has MAX_COMMANDS_PER_SET. */
Bool getCommandPlaces( Int *places ) const;
- /** Where the page's scout, search and destroy and stance keys stand for what is selected now,
+ /** Where the page's search and destroy and stance keys stand for what is selected now,
ORDER_KEY_EXTRAS of them, -1 for one that is not offered. See ControlBar_orderKeyPlaces. */
void getOrderKeyPlaces( Int *keys ) const;
diff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/InGameUI.h b/GeneralsMD/Code/GameEngine/Include/GameClient/InGameUI.h
index 41c275d47..3cbd7e670 100644
--- a/GeneralsMD/Code/GameEngine/Include/GameClient/InGameUI.h
+++ b/GeneralsMD/Code/GameEngine/Include/GameClient/InGameUI.h
@@ -1255,17 +1255,16 @@ public: // ********************************************************************
void toggleGuardArmed( void ) { m_guardArmed = !m_guardArmed; m_attackMoveToMode = FALSE; m_forceAttackArmed = FALSE; m_moveArmed = FALSE; m_areaOrder = AREA_ORDER_NONE; }
Bool isGuardArmed( void ) const { return m_guardArmed; }
- // The scout and search and destroy keys (fork) arm a sweep the same way: the next order click is
- // the centre of a circle, sized with the wheel like a guard's, and the selection goes round it.
- // Scout walks the ring and comes back to the centre; search and destroy attack moves round it and
- // then guards the whole circle. Both skip the ring's points the player already sees
- enum AreaOrder { AREA_ORDER_NONE, AREA_ORDER_SCOUT, AREA_ORDER_HUNT };
+ // The search and destroy key (fork) arms a sweep the same way: the next order click is the centre
+ // of a circle, sized with the wheel like a guard's, and the selection attack moves round it and
+ // then guards the whole circle. It skips the ring's points the player already sees
+ enum AreaOrder { AREA_ORDER_NONE, AREA_ORDER_HUNT };
void toggleAreaOrderArmed( AreaOrder order );
AreaOrder getAreaOrderArmed( void ) const { return m_areaOrder; }
void issueAreaSweep( const Coord3D &center ); ///< the armed sweep's messages, round `center`
/** One of the page's keys past attack, hold position and move, an OrderKeyExtra (ControlBar.h),
- * pressed with the mouse or its grid key: scout and search and destroy arm their sweep, the
+ * pressed with the mouse or its grid key: search and destroy arms its sweep, the
* stance key puts the selection on the other stance from the first unit's */
void pressOrderKey( Int key );
@@ -1613,7 +1612,7 @@ protected:
HtmlOverlay * m_promotionFrontOverlay; ///< the grid's frames, drawn over the promotions
HtmlOverlay * m_cellFrontOverlay[ CELL_GRID_COUNT ];
std::vector< HtmlValues > m_cellFrontCells[ CELL_GRID_COUNT ]; ///< each grid's cells as the bar's page last placed them
- enum { ORDER_KEYS = 6 }; ///< the page's attack, hold position and move keys, then the OrderKeyExtra ones
+ enum { ORDER_KEYS = 5 }; ///< the page's attack, hold position and move keys, then the OrderKeyExtra ones
IRegion2D m_orderKeyCell[ ORDER_KEYS ]; ///< where the page last put each, screen pixels
Int m_orderKeyPlace[ ORDER_KEYS ]; ///< the CommandPlace each stands on, -1 while it is not shown
DisplayString * m_orderKeyString[ ORDER_KEYS ]; ///< each one's letter, on the command buttons' plate
@@ -1871,7 +1870,7 @@ protected:
Bool m_attackMoveToMode; ///< are we in attack move mode?
Bool m_forceAttackArmed; ///< is the attack key holding force fire for the next click?
Bool m_guardArmed; ///< is the guard key holding a guard order for the next click?
- AreaOrder m_areaOrder; ///< the sweep the scout or search and destroy key holds for the next click
+ AreaOrder m_areaOrder; ///< the sweep the search and destroy key holds for the next click
Real m_areaPickScale; ///< what the wheel has made of the armed area order's default radius
Bool m_moveArmed; ///< is the move key holding a move for the next click?
Bool m_orderKeyKeptByShift; ///< an armed key was clicked with under shift, and drops when shift comes up
diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/ScenarioDrill.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/ScenarioDrill.h
index 8d2cf568d..f394e85cc 100644
--- a/GeneralsMD/Code/GameEngine/Include/GameLogic/ScenarioDrill.h
+++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/ScenarioDrill.h
@@ -84,8 +84,7 @@ enum ScenarioActionType
SCENARIO_ACTION_DOCK, ///< dock <slot> <selector> <targetSlot> <targetSelector>; a right click on a supply point or a dock
SCENARIO_ACTION_CONSTRUCT, ///< construct <slot> <template> <position>; the local player's placement click, whatever is selected, as a message that is recorded and crosses the network
SCENARIO_ACTION_STANCE, ///< stance <slot> <selector> aggressive|defensive; the stance key, as MSG_SET_STANCE
- SCENARIO_ACTION_SCOUT, ///< scout <slot> <selector> <position> [radius]; the scout key's sweep, through the order queue as its messages arrive
- SCENARIO_ACTION_HUNT ///< hunt <slot> <selector> <position> [radius]; the same with search and destroy
+ SCENARIO_ACTION_HUNT ///< hunt <slot> <selector> <position> [radius]; the search and destroy key's sweep, through the order queue as its messages arrive
};
/// ScenarioAction::atStart when the position is plain numbers
diff --git a/GeneralsMD/Code/GameEngine/Source/Common/System/KindOf.cpp b/GeneralsMD/Code/GameEngine/Source/Common/System/KindOf.cpp
index 8739e934e..f3eeaf2d3 100644
--- a/GeneralsMD/Code/GameEngine/Source/Common/System/KindOf.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/Common/System/KindOf.cpp
@@ -160,7 +160,6 @@ template<> const char* KindOfMaskType::s_bitNameList[] =
"CONSERVATIVE_BUILDING",
"IGNORE_DOCKING_BONES",
"NO_ATTACK_WARNING",
- "SCOUT",
NULL
};
diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp
index a77246b47..7d64b55f8 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp
@@ -379,30 +379,30 @@ Bool ControlBar_commandPlaces( const Int *types, const Int *groups, const Int *p
}
//-------------------------------------------------------------------------------------------------
-void ControlBar_orderKeyPlaces( const Int *places, Int count, Bool fights, Bool scouts, Int *keys )
+void ControlBar_orderKeyPlaces( const Int *places, Int count, Bool fights, Int *keys )
{
+ for( Int key = 0; key < ORDER_KEY_EXTRAS; key++ )
+ keys[ key ] = -1;
+ if( !fights )
+ return;
+
Bool taken[ COMMAND_PLACE_COUNT ] = { FALSE };
for( Int slot = 0; slot < count; slot++ )
if( places[ slot ] >= 0 )
taken[ places[ slot ] ] = TRUE;
- if( fights )
- taken[ COMMAND_PLACE_ATTACK ] = taken[ COMMAND_PLACE_HOLD ] = taken[ COMMAND_PLACE_MOVE ] = TRUE;
+ taken[ COMMAND_PLACE_ATTACK ] = taken[ COMMAND_PLACE_HOLD ] = taken[ COMMAND_PLACE_MOVE ] = TRUE;
- static const Int OWN[ ORDER_KEY_EXTRAS ] = { COMMAND_PLACE_G, COMMAND_PLACE_F, COMMAND_PLACE_H };
- const Bool offered[ ORDER_KEY_EXTRAS ] = { scouts, fights, fights };
+ static const Int OWN[ ORDER_KEY_EXTRAS ] = { COMMAND_PLACE_F, COMMAND_PLACE_H };
for( Int key = 0; key < ORDER_KEY_EXTRAS; key++ )
- {
- keys[ key ] = -1;
- if( offered[ key ] && !taken[ OWN[ key ] ] )
+ if( !taken[ OWN[ key ] ] )
keys[ key ] = OWN[ key ];
- }
for( Int key = 0; key < ORDER_KEY_EXTRAS; key++ )
if( keys[ key ] >= 0 )
taken[ keys[ key ] ] = TRUE;
for( Int key = 0; key < ORDER_KEY_EXTRAS; key++ )
{
- if( !offered[ key ] || keys[ key ] >= 0 )
+ if( keys[ key ] >= 0 )
continue;
static const Int SPARE[] = { COMMAND_PLACE_B, COMMAND_PLACE_N };
for( Int each = 0; each < (Int)ARRAY_SIZE( SPARE ) && keys[ key ] < 0; each++ )
@@ -421,15 +421,7 @@ void ControlBar::getOrderKeyPlaces( Int *keys ) const
{
Int places[ MAX_COMMANDS_PER_SET ];
const Bool fights = getCommandPlaces( places );
- // no keys at all for a selection whose command group is hidden, as getCommandPlaces has no buttons
- Bool scouts = FALSE;
- if( !m_contextParent[ CP_COMMAND ]->winIsHidden() )
- {
- const DrawableList *selected = TheInGameUI->getAllSelectedLocalDrawables();
- for( DrawableListCIt it = selected->begin(); it != selected->end() && !scouts; ++it )
- scouts = (*it)->getObject() && (*it)->getObject()->isKindOf( KINDOF_SCOUT );
- }
- ControlBar_orderKeyPlaces( places, MAX_COMMANDS_PER_SET, fights, scouts, keys );
+ ControlBar_orderKeyPlaces( places, MAX_COMMANDS_PER_SET, fights, keys );
}
//-------------------------------------------------------------------------------------------------
@@ -492,7 +484,7 @@ void ControlBar::pressCommandButton( Int place )
if( place < 0 || place >= COMMAND_PLACE_COUNT )
return;
- // the page's scout, search and destroy and stance keys stand where no button does
+ // the page's search and destroy and stance keys stand where no button does
Int keys[ ORDER_KEY_EXTRAS ];
getOrderKeyPlaces( keys );
for( Int key = 0; key < ORDER_KEY_EXTRAS; key++ )
diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp
index 971dbb8ce..fee023e27 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp
@@ -7365,10 +7365,10 @@ void InGameUI::adjustPlacementRowGap( Real spin )
static const Real AREA_PICK_RADIUS_MIN = 50.0f;
static const Real AREA_PICK_STEP = 1.15f; ///< what one notch of the wheel multiplies the radius by
-static const Real AREA_SWEEP_RADIUS = 300.0f; ///< a scout's or a search and destroy's circle before the wheel
+static const Real AREA_SWEEP_RADIUS = 300.0f; ///< a search and destroy's circle before the wheel
//-------------------------------------------------------------------------------------------------
-/** The guard key, the scout and search and destroy keys, or one of EA's guard buttons waiting for
+/** The guard key, the search and destroy key, or one of EA's guard buttons waiting for
* its click. */
//-------------------------------------------------------------------------------------------------
Bool InGameUI::isAreaPicking( void ) const
@@ -7455,9 +7455,7 @@ static Bool isSelectionAggressive( void )
//-------------------------------------------------------------------------------------------------
void InGameUI::pressOrderKey( Int key )
{
- if( key == ORDER_KEY_SCOUT )
- toggleAreaOrderArmed( AREA_ORDER_SCOUT );
- else if( key == ORDER_KEY_HUNT )
+ if( key == ORDER_KEY_HUNT )
toggleAreaOrderArmed( AREA_ORDER_HUNT );
else if( key == ORDER_KEY_STANCE && getSelectCount() > 0 )
{
@@ -7469,8 +7467,8 @@ void InGameUI::pressOrderKey( Int key )
//-------------------------------------------------------------------------------------------------
/** The ring is walked from the point nearest the selection, each point an order of its own on the
* units' list (OrderQueue.h): the first replaces what they were doing, unless shift puts the whole
- * sweep behind it. A scout comes back to the centre; a search and destroy attack moves the ring,
- * so it fights what it meets, and ends guarding the circle it was given. */
+ * sweep behind it. Search and destroy attack moves the ring, so it fights what it meets, and
+ * ends guarding the circle it was given. */
//-------------------------------------------------------------------------------------------------
void InGameUI::issueAreaSweep( const Coord3D &center )
{
@@ -7492,30 +7490,24 @@ void InGameUI::issueAreaSweep( const Coord3D &center )
from.x /= count;
from.y /= count;
- const Bool hunt = m_areaOrder == AREA_ORDER_HUNT;
const Real radius = getAreaPickRadius();
std::vector<Coord3D> route;
sweepRoute( ThePlayerList->getLocalPlayer()->getPlayerIndex(), center, radius, from, route );
- const GameMessage::Type step = hunt ? GameMessage::MSG_DO_ATTACKMOVETO : GameMessage::MSG_DO_MOVETO;
+ const GameMessage::Type step = GameMessage::MSG_DO_ATTACKMOVETO;
for( size_t i = 0; i < route.size(); i++ )
{
markNextOrderQueued( ( i == 0 && !isInWaypointMode() ) ? ORDER_QUEUE_FRESH : ORDER_QUEUE_APPEND );
TheMessageStream->appendMessage( step )->appendLocationArgument( route[ i ] );
}
markNextOrderQueued( ORDER_QUEUE_APPEND );
- if( hunt )
- {
- GameMessage *guard = TheMessageStream->appendMessage( GameMessage::MSG_DO_GUARD_POSITION );
- guard->appendLocationArgument( center );
- guard->appendIntegerArgument( GUARDMODE_NORMAL );
- guard->appendRealArgument( radius );
- }
- else
- TheMessageStream->appendMessage( GameMessage::MSG_DO_MOVETO )->appendLocationArgument( center );
+ GameMessage *guard = TheMessageStream->appendMessage( GameMessage::MSG_DO_GUARD_POSITION );
+ guard->appendLocationArgument( center );
+ guard->appendIntegerArgument( GUARDMODE_NORMAL );
+ guard->appendRealArgument( radius );
pickAndPlayUnitVoiceResponse( selected, step );
- DEBUG_LOG(( "area sweep: %s round (%.0f,%.0f) radius %.0f, %d points, %d units\n", hunt ? "hunt" : "scout",
+ DEBUG_LOG(( "area sweep: hunt round (%.0f,%.0f) radius %.0f, %d points, %d units\n",
center.x, center.y, radius, (Int)route.size(), count ));
}
@@ -11580,8 +11572,8 @@ static void armSignalFromPage( const std::string &kind )
//-------------------------------------------------------------------------------------------------
/** data-click="order:attack", "order:hold" or "order:move", the command panel's orders no command set
* has a button for: what the A, C and V keys do, force fire armed for the next click, hold position,
- * and a move armed for the next click. "order:scout", "order:hunt" and "order:stance" are the
- * keys after them, pressOrderKey's. */
+ * and a move armed for the next click. "order:hunt" and "order:stance" are the keys after them,
+ * pressOrderKey's. */
//-------------------------------------------------------------------------------------------------
static void orderFromPage( const std::string &order )
{
@@ -11589,8 +11581,6 @@ static void orderFromPage( const std::string &order )
TheInGameUI->toggleForceAttackArmed();
else if( order == "move" )
TheInGameUI->toggleMoveArmed();
- else if( order == "scout" )
- TheInGameUI->pressOrderKey( ORDER_KEY_SCOUT );
else if( order == "hunt" )
TheInGameUI->pressOrderKey( ORDER_KEY_HUNT );
else if( order == "stance" )
@@ -12396,7 +12386,7 @@ Bool InGameUI::drawControlBarPage( const IRegion2D *panels, const Bool *shown, I
// attack, hold position and move have no button in any command set: the page's keys do what A, C
// and V do, for anything that attack moves
taken[ COMMAND_PLACE_ATTACK ] = taken[ COMMAND_PLACE_HOLD ] = taken[ COMMAND_PLACE_MOVE ] = fights;
- // and scout, search and destroy and the stance key wherever there is room for them
+ // and search and destroy and the stance key wherever there is room for them
Int extraKeys[ ORDER_KEY_EXTRAS ];
TheControlBar->getOrderKeyPlaces( extraKeys );
for( Int key = 0; key < ORDER_KEY_EXTRAS; key++ )
@@ -12533,9 +12523,9 @@ Bool InGameUI::drawControlBarPage( const IRegion2D *panels, const Bool *shown, I
if( where[ button ] >= 0 )
TheControlBar->placeWindowAt( numberedWindow( "ButtonCommand", button + 1 ), place[ where[ button ] ] );
// the page's own keys; their letters are drawCellGridFront's, on the command buttons' own plate
- static const char *const ORDER_KEY_NAMES[ ORDER_KEYS ] = { "attackkey", "holdkey", "movekey", "scoutkey", "huntkey", "stancekey" };
+ static const char *const ORDER_KEY_NAMES[ ORDER_KEYS ] = { "attackkey", "holdkey", "movekey", "huntkey", "stancekey" };
const Int orderKeyPlaces[ ORDER_KEYS ] = { fights ? COMMAND_PLACE_ATTACK : -1, fights ? COMMAND_PLACE_HOLD : -1,
- fights ? COMMAND_PLACE_MOVE : -1, extraKeys[ ORDER_KEY_SCOUT ], extraKeys[ ORDER_KEY_HUNT ], extraKeys[ ORDER_KEY_STANCE ] };
+ fights ? COMMAND_PLACE_MOVE : -1, extraKeys[ ORDER_KEY_HUNT ], extraKeys[ ORDER_KEY_STANCE ] };
for( Int key = 0; key < ORDER_KEYS; key++ )
{
m_orderKeyPlace[ key ] = centreShown ? orderKeyPlaces[ key ] : -1;
@@ -15006,11 +14996,11 @@ Bool InGameUI::drawTooltipPage( const UnicodeString &cursorText, const RGBColor
const ICoord2D &mouse = TheMouse->getMouseStatus()->pos;
const BuildTooltipCard *card = TheControlBar->getBuildTooltipCard();
- // the attack, hold position and move keys and the three after them are the page's own, with no
+ // the attack, hold position and move keys and the two after them are the page's own, with no
// window behind them for the bar's tooltip to find, so their cards are made here and stand on the
// console as a button's does. The stance key's card names the stance the selection is on
static const char *const ORDER_KEY_LABELS[ ORDER_KEYS ] = { "GUI:OrderForceAttack", "GUI:OrderHoldPosition", "GUI:OrderMove",
- "GUI:OrderScout", "GUI:OrderSearchAndDestroy", "GUI:OrderStanceDefensive" };
+ "GUI:OrderSearchAndDestroy", "GUI:OrderStanceDefensive" };
BuildTooltipCard orderCard = BuildTooltipCard();
if( m_controlBarPageShown && !areTooltipsDisabled() && !isQuitMenuVisible() )
{
diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp
index e7fbfcc7d..6155be275 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp
@@ -1610,7 +1610,7 @@ GameMessage::Type CommandTranslator::evaluateContextCommand( Drawable *draw,
const Coord3D *pos,
CommandEvaluateType type )
{
- // the scout and search and destroy keys sweep a circle round the point, whatever stands on it
+ // the search and destroy key sweeps a circle round the point, whatever stands on it
if( TheInGameUI->getAreaOrderArmed() != InGameUI::AREA_ORDER_NONE && TheInGameUI->areSelectedObjectsControllable() )
{
if( type == DO_COMMAND )
diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/SelectionXlat.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/SelectionXlat.cpp
index 70560d0b3..5b24994d1 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/SelectionXlat.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/SelectionXlat.cpp
@@ -430,8 +430,8 @@ 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. 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
+ // no selection box grows under it. Search and destroy has no line to draw, and its 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;
diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/System/ScenarioDrill.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/System/ScenarioDrill.cpp
index 26c1ce051..6cbcb3f3f 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/System/ScenarioDrill.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/System/ScenarioDrill.cpp
@@ -95,7 +95,7 @@ static const Int SCENARIO_SHIFTPOWER_NAME_TOKEN = 6;
static const Int SCENARIO_SHIFTUPGRADE_NAME_TOKEN = 4;
static const Int SCENARIO_STANCE_NAME_TOKEN = 4;
-/// a scout's or a hunt's circle when the line does not say, the keys' own before the wheel
+/// a hunt's circle when the line does not say, the key's own before the wheel
static const Real SCENARIO_DEFAULT_SWEEP_RADIUS = 300.0f;
// where the position starts in each line that has one
@@ -217,8 +217,6 @@ static Bool parseActionType( const AsciiString &token, ScenarioActionType *actio
*action = SCENARIO_ACTION_CONSTRUCT;
else if (token == "stance")
*action = SCENARIO_ACTION_STANCE;
- else if (token == "scout")
- *action = SCENARIO_ACTION_SCOUT;
else if (token == "hunt")
*action = SCENARIO_ACTION_HUNT;
else
@@ -303,7 +301,6 @@ static Int tokensNeededFor( ScenarioActionType action )
case SCENARIO_ACTION_SHIFTATTACKMOVE: return SCENARIO_TOKENS_MOVE;
case SCENARIO_ACTION_SHIFTGUARD: return SCENARIO_TOKENS_MOVE;
case SCENARIO_ACTION_CONSTRUCT: return SCENARIO_TOKENS_MOVE;
- case SCENARIO_ACTION_SCOUT: return SCENARIO_TOKENS_MOVE;
case SCENARIO_ACTION_HUNT: return SCENARIO_TOKENS_MOVE;
case SCENARIO_ACTION_STANCE: return SCENARIO_TOKENS_STANCE;
case SCENARIO_ACTION_SHIFTATTACK: return SCENARIO_TOKENS_ATTACK;
@@ -386,14 +383,13 @@ ScenarioParseResult ScenarioDrill_parseLine( const char *line, ScenarioAction *a
case SCENARIO_ACTION_SHIFTATTACKMOVE:
case SCENARIO_ACTION_SHIFTGUARD:
case SCENARIO_ACTION_CONSTRUCT:
- case SCENARIO_ACTION_SCOUT:
case SCENARIO_ACTION_HUNT:
{
Int next = SCENARIO_ORDER_POSITION_TOKEN;
const ScenarioParseResult position = parseScenarioPosition( tokens, count, &next, action );
if (position != SCENARIO_PARSE_OK)
return position;
- if (actionType == SCENARIO_ACTION_SCOUT || actionType == SCENARIO_ACTION_HUNT)
+ if (actionType == SCENARIO_ACTION_HUNT)
action->radius = (count > next) ? (Real)atof( tokens[ next ].str() ) : SCENARIO_DEFAULT_SWEEP_RADIUS;
if (actionType == SCENARIO_ACTION_ARRIVE && count > next)
action->radius = (Real)atof( tokens[ next ].str() );
@@ -1326,10 +1322,10 @@ static Bool executeStance( const ScenarioAction &action, Player *player, AIGroup
return TRUE;
}
-/** The scout and search and destroy keys: the ring sweepRoute gives this seat round the point, from
- where the units stand, each point handed to the order queue the way the key's messages arrive -
- the first fresh, the rest behind it - and then the centre, or a guard of the whole circle. Each
- message gets a group of its own, because the queue destroys the one it takes. */
+/** The search and destroy key: the ring sweepRoute gives this seat round the point, from where the
+ units stand, each point handed to the order queue the way the key's messages arrive - the first
+ fresh, the rest behind it - and then a guard of the whole circle. Each message gets a group of
+ its own, because the queue destroys the one it takes. */
static Bool executeSweep( const ScenarioAction &action, Player *player, const Coord3D &center, AIGroup *group, Int taken )
{
Coord3D from;
@@ -1345,7 +1341,6 @@ static Bool executeSweep( const ScenarioAction &action, Player *player, const Co
from.y /= taken;
TheAI->destroyGroup( group );
- const Bool hunt = action.action == SCENARIO_ACTION_HUNT;
std::vector<Coord3D> route;
sweepRoute( player->getPlayerIndex(), center, action.radius, from, route );
route.push_back( center );
@@ -1353,9 +1348,7 @@ static Bool executeSweep( const ScenarioAction &action, Player *player, const Co
for( size_t i = 0; i < route.size(); i++ )
{
const Bool last = i + 1 == route.size();
- GameMessage::Type type = hunt ? GameMessage::MSG_DO_ATTACKMOVETO : GameMessage::MSG_DO_MOVETO;
- if( last && hunt )
- type = GameMessage::MSG_DO_GUARD_POSITION;
+ const GameMessage::Type type = last ? GameMessage::MSG_DO_GUARD_POSITION : GameMessage::MSG_DO_ATTACKMOVETO;
GameMessage *msg = newInstance( GameMessage )( type );
msg->friend_setPlayerIndex( player->getPlayerIndex() );
msg->appendLocationArgument( route[ i ] );
@@ -1371,11 +1364,11 @@ static Bool executeSweep( const ScenarioAction &action, Player *player, const Co
player->getOrderQueue()->takeMessage( msg, members, player );
msg->deleteInstance();
- DEBUG_LOG(("SCENARIO: frame %d %s slot %d '%s' step %d of %d at (%.0f,%.0f)\n", action.frame, hunt ? "hunt" : "scout",
+ DEBUG_LOG(("SCENARIO: frame %d hunt slot %d '%s' step %d of %d at (%.0f,%.0f)\n", action.frame,
action.slot, action.selector.str(), (Int)i + 1, (Int)route.size(), route[ i ].x, route[ i ].y));
}
- DEBUG_LOG(("SCENARIO: frame %d %s slot %d '%s' x%d round (%.0f,%.0f) radius %.0f\n", action.frame, hunt ? "hunt" : "scout",
+ DEBUG_LOG(("SCENARIO: frame %d hunt slot %d '%s' x%d round (%.0f,%.0f) radius %.0f\n", action.frame,
action.slot, action.selector.str(), taken, center.x, center.y, action.radius));
return TRUE;
}
@@ -1464,7 +1457,6 @@ static Bool executeOrder( const ScenarioAction &action, Player *player, const Co
case SCENARIO_ACTION_STANCE:
return executeStance( action, player, group, taken ); // the dispatcher destroys the group
- case SCENARIO_ACTION_SCOUT:
case SCENARIO_ACTION_HUNT:
return executeSweep( action, player, dest, group, taken ); // and so does this
diff --git a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DInGameUI.cpp b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DInGameUI.cpp
index 461583c58..c7a6b4174 100644
--- a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DInGameUI.cpp
+++ b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DInGameUI.cpp
@@ -447,14 +447,13 @@ void W3DInGameUI::draw( void )
drawGuardMarkers();
// the circle an armed guard will hold, under the cursor, at the size the wheel left it. A drag
- // is drawing a guard line instead, where every unit holds its own station. A scout's circle is
- // the move green and a search and destroy's the attack move colour, as their hints are
+ // is drawing a guard line instead, where every unit holds its own station. A search and
+ // destroy's circle is the attack move colour, as its hint is
if( isAreaPicking() && !m_isFormationDragging )
{
Coord3D center;
TheTacticalView->screenToTerrain( &TheMouse->getMouseStatus()->pos, &center );
- const UnsignedInt color = getAreaOrderArmed() == AREA_ORDER_SCOUT ? 0xCC33FF33
- : getAreaOrderArmed() == AREA_ORDER_HUNT ? 0xCCFF66CC
+ const UnsignedInt color = getAreaOrderArmed() == AREA_ORDER_HUNT ? 0xCCFF66CC
: 0xCC55CCFF; // the guard blue the hints use
drawGroundRing( center, getAreaPickRadius(), color, 2.0f );
}
diff --git a/GeneralsMD/Code/Tests/test_gameengine.cpp b/GeneralsMD/Code/Tests/test_gameengine.cpp
index 585225f60..315cb1441 100644
--- a/GeneralsMD/Code/Tests/test_gameengine.cpp
+++ b/GeneralsMD/Code/Tests/test_gameengine.cpp
@@ -3526,7 +3526,7 @@ TEST(controlbar_command_places_go_in_rows_by_what_they_are_for)
CHECK_EQ( places[ slot ], manyPlaces[ slot ] );
}
-TEST(controlbar_scout_hunt_and_stance_keys_take_what_the_buttons_leave)
+TEST(controlbar_hunt_and_stance_keys_take_what_the_buttons_leave)
{
enum { SLOTS = 14 };
Int places[ SLOTS ];
@@ -3535,40 +3535,32 @@ TEST(controlbar_scout_hunt_and_stance_keys_take_what_the_buttons_leave)
const Int nothingPinned[ SLOTS ] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 };
/* a Ranger: two abilities, attack move, guard, stop. Search and destroy on F and the stance on H,
- their own places; no scout in the selection, so no scout key */
+ their own places */
const Int ranger[ SLOTS ] = { GUI_COMMAND_FIRE_WEAPON, GUI_COMMAND_SPECIAL_POWER, N, N, N, N, N, N, N, N,
GUI_COMMAND_ATTACK_MOVE, N, GUI_COMMAND_GUARD, GUI_COMMAND_STOP };
const Int rangerGroups[ SLOTS ] = { ab, ab, ab, ab, ab, ab, ab, ab, ab, ab, ab, ab, ab, ab };
Bool fights = ControlBar_commandPlaces( ranger, rangerGroups, nothingPinned, SLOTS, places );
CHECK( fights );
- ControlBar_orderKeyPlaces( places, SLOTS, fights, FALSE, keys );
- CHECK_EQ( keys[ ORDER_KEY_SCOUT ], -1 );
- CHECK_EQ( keys[ ORDER_KEY_HUNT ], (Int)COMMAND_PLACE_F );
- CHECK_EQ( keys[ ORDER_KEY_STANCE ], (Int)COMMAND_PLACE_H );
- // the same with a Pathfinder in the selection puts scout on G between them
- ControlBar_orderKeyPlaces( places, SLOTS, fights, TRUE, keys );
- CHECK_EQ( keys[ ORDER_KEY_SCOUT ], (Int)COMMAND_PLACE_G );
+ ControlBar_orderKeyPlaces( places, SLOTS, fights, keys );
CHECK_EQ( keys[ ORDER_KEY_HUNT ], (Int)COMMAND_PLACE_F );
CHECK_EQ( keys[ ORDER_KEY_STANCE ], (Int)COMMAND_PLACE_H );
/* the Humvee's set, as in the test above: passengers hold F G H B N and the drones Q W E, so the
- three go on in reading order, R T Y, and never move a button */
+ two go on in reading order, R T, and never move a button */
const Int humvee[ SLOTS ] = { GUI_COMMAND_OBJECT_UPGRADE, GUI_COMMAND_OBJECT_UPGRADE, GUI_COMMAND_OBJECT_UPGRADE,
GUI_COMMAND_EXIT_CONTAINER, GUI_COMMAND_EXIT_CONTAINER, GUI_COMMAND_EXIT_CONTAINER, GUI_COMMAND_EXIT_CONTAINER,
GUI_COMMAND_EXIT_CONTAINER, GUI_COMMAND_EVACUATE, N, GUI_COMMAND_ATTACK_MOVE, N, GUI_COMMAND_GUARD, GUI_COMMAND_STOP };
const Int humveeGroups[ SLOTS ] = { ab, ab, ab, pa, pa, pa, pa, pa, ab, ab, ab, ab, ab, ab };
fights = ControlBar_commandPlaces( humvee, humveeGroups, nothingPinned, SLOTS, places );
- ControlBar_orderKeyPlaces( places, SLOTS, fights, TRUE, keys );
- CHECK_EQ( keys[ ORDER_KEY_SCOUT ], (Int)COMMAND_PLACE_R );
- CHECK_EQ( keys[ ORDER_KEY_HUNT ], (Int)COMMAND_PLACE_T );
- CHECK_EQ( keys[ ORDER_KEY_STANCE ], (Int)COMMAND_PLACE_Y );
+ ControlBar_orderKeyPlaces( places, SLOTS, fights, keys );
+ CHECK_EQ( keys[ ORDER_KEY_HUNT ], (Int)COMMAND_PLACE_R );
+ CHECK_EQ( keys[ ORDER_KEY_STANCE ], (Int)COMMAND_PLACE_T );
- /* a Radar Van: a scan and an upgrade, nothing to attack move with. Scout alone */
+ /* a Radar Van: a scan and an upgrade, nothing to attack move with, so neither key */
const Int van[ SLOTS ] = { GUI_COMMAND_SPECIAL_POWER, GUI_COMMAND_OBJECT_UPGRADE, N, N, N, N, N, N, N, N, N, N, N, GUI_COMMAND_STOP };
fights = ControlBar_commandPlaces( van, rangerGroups, nothingPinned, SLOTS, places );
CHECK( !fights );
- ControlBar_orderKeyPlaces( places, SLOTS, fights, TRUE, keys );
- CHECK_EQ( keys[ ORDER_KEY_SCOUT ], (Int)COMMAND_PLACE_G );
+ ControlBar_orderKeyPlaces( places, SLOTS, fights, keys );
CHECK_EQ( keys[ ORDER_KEY_HUNT ], -1 );
CHECK_EQ( keys[ ORDER_KEY_STANCE ], -1 );
@@ -3576,12 +3568,12 @@ TEST(controlbar_scout_hunt_and_stance_keys_take_what_the_buttons_leave)
Int full[ SLOTS + 4 ];
for( Int place = 0; place < COMMAND_PLACE_COUNT; place++ )
full[ place ] = place;
- ControlBar_orderKeyPlaces( full, COMMAND_PLACE_COUNT, TRUE, TRUE, keys );
+ ControlBar_orderKeyPlaces( full, COMMAND_PLACE_COUNT, TRUE, keys );
for( Int key = 0; key < ORDER_KEY_EXTRAS; key++ )
CHECK_EQ( keys[ key ], -1 );
}
-/* The scout and search and destroy keys walk a ring at seven tenths of the circle, starting on the
+/* The search and destroy key walks a ring at seven tenths of the circle, starting on the
side the selection stands and going round clockwise, four to eight points by size, never off the map. */
TEST(sweep_points_go_round_the_ring_from_the_selection_side)
{
@@ -14847,14 +14839,14 @@ TEST(scenario_parses_the_order_lines)
CHECK_STR( action.selector.str(), "ChinaGattlingCannon" );
CHECK_EQ( (Int)ScenarioDrill_parseLine( "1800 tally 1", &action ), (Int)SCENARIO_PARSE_MISSING_ARGS );
- // the stance key, and the two sweeps with the keys' own circle unless the line sizes it
+ // the stance key, and the sweep with the key's own circle unless the line sizes it
CHECK_EQ( (Int)ScenarioDrill_parseLine( "60 stance 0 AmericaTankCrusader aggressive", &action ), (Int)SCENARIO_PARSE_OK );
CHECK_EQ( (Int)action.action, (Int)SCENARIO_ACTION_STANCE );
CHECK_STR( action.name.str(), "aggressive" );
CHECK_EQ( (Int)ScenarioDrill_parseLine( "60 stance 0 * bold", &action ), (Int)SCENARIO_PARSE_BAD_ACTION );
CHECK_EQ( (Int)ScenarioDrill_parseLine( "60 stance 0 *", &action ), (Int)SCENARIO_PARSE_MISSING_ARGS );
- CHECK_EQ( (Int)ScenarioDrill_parseLine( "60 scout 0 * 900 700", &action ), (Int)SCENARIO_PARSE_OK );
- CHECK_EQ( (Int)action.action, (Int)SCENARIO_ACTION_SCOUT );
+ CHECK_EQ( (Int)ScenarioDrill_parseLine( "60 hunt 0 * 900 700", &action ), (Int)SCENARIO_PARSE_OK );
+ CHECK_EQ( (Int)action.action, (Int)SCENARIO_ACTION_HUNT );
CHECK( action.radius == 300.0f );
CHECK_EQ( (Int)ScenarioDrill_parseLine( "60 hunt 0 * 900 700 450", &action ), (Int)SCENARIO_PARSE_OK );
CHECK_EQ( (Int)action.action, (Int)SCENARIO_ACTION_HUNT );
diff --git a/GeneralsMD/Code/Tools/order_cameos.py b/GeneralsMD/Code/Tools/order_cameos.py
index 86bd9cdbd..271194ab7 100644
--- a/GeneralsMD/Code/Tools/order_cameos.py
+++ b/GeneralsMD/Code/Tools/order_cameos.py
@@ -1,13 +1,12 @@
-"""The command bar's attack, hold position, move, scout, search and destroy and stance cameos,
+"""The command bar's attack, hold position, move, search and destroy and stance cameos,
painted in the manner of EA's command cameos (SSStop, SSGuard): a sign with a bevelled steel rim and
four bolts standing over a painted backdrop. No command set has a button for any of these orders,
so the game has no picture for them.
Attack is a red plate with a white crosshair over a burning sky, hold position a blue plate with a
-raised palm over a blue one, move a green diamond with a white arrow over an overcast field. Scout
-is an amber disc with an open eye over a dawn sky, search and destroy an orange plate with a
-magnifying glass over a dusk one, the aggressive stance a red pennant of two chevrons pointing ahead
-and the defensive one a steel blue shield. Each is painted at four times its size and brought down,
+raised palm over a blue one, move a green diamond with a white arrow over an overcast field. Search
+and destroy is an orange plate with a magnifying glass over a dusk sky, the aggressive stance a red
+pennant of two chevrons pointing ahead and the defensive one a steel blue shield. Each is painted at four times its size and brought down,
which is
what softens the edges into the look of the shipped art. The noise is seeded, so the file comes
out the same every time.
@@ -27,7 +26,7 @@ from PIL import Image, ImageDraw, ImageFilter
CAMEO_W, CAMEO_H = 60, 48 # every command cameo in the shipped mapped images
SUPER = 4 # painted at this many times the size
TEXTURE_W, TEXTURE_H = 256, 128
-CAMEO_PLACES = {"attack": (0, 0), "hold": (64, 0), "move": (0, 64), "scout": (64, 64), "hunt": (128, 0),
+CAMEO_PLACES = {"attack": (0, 0), "hold": (64, 0), "move": (0, 64), "hunt": (128, 0),
"aggressive": (192, 0), "defensive": (128, 64)}
SEED = 20260928
OUT_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", "Data", "Art", "Textures", "ReforgedOrders.tga")
@@ -186,34 +185,11 @@ def move(rng):
return image
-def corner_bolts(cx, cy, reach):
- return [(cx - reach, cy - reach), (cx + reach, cy - reach), (cx - reach, cy + reach), (cx + reach, cy + reach)]
-
-
def octagon(left, top, right, bottom, cut):
return [(left + cut, top), (right - cut, top), (right, top + cut), (right, bottom - cut),
(right - cut, bottom), (left + cut, bottom), (left, bottom - cut), (left, top + cut)]
-def scout(rng):
- image = backdrop(rng, (60, 70, 112), (232, 172, 112), (240, 222, 200), (40, 36, 30))
- cx, cy, radius = W / 2, H / 2 - SUPER, H * 0.44
- plate(image, circle_points(cx, cy, radius), (222, 160, 28), corner_bolts(cx, cy, radius * 0.62))
- # an open eye: the white of it, a dark iris and a glint
- draw = ImageDraw.Draw(image)
- white = (248, 246, 240)
- across, tall = radius * 0.6, radius * 0.32
- eye = [(cx + across * math.cos(t), cy + tall * math.sin(t) * abs(math.sin(t)) ** 0.2)
- for t in np.linspace(0, 2 * math.pi, 64, endpoint=False)]
- draw.polygon(eye, fill=white)
- iris = tall * 0.95
- draw.ellipse((cx - iris, cy - iris, cx + iris, cy + iris), fill=(44, 40, 34))
- glint = iris * 0.32
- draw.ellipse((cx - glint - iris * 0.3, cy - glint - iris * 0.3, cx + glint - iris * 0.3, cy + glint - iris * 0.3),
- fill=white)
- return image
-
-
def hunt(rng):
image = backdrop(rng, (44, 32, 62), (200, 104, 62), (150, 122, 120), (30, 24, 22), glow=(255, 120, 40))
left, top, right, bottom = W * 0.2, SUPER * 2, W * 0.8, H - SUPER * 5
@@ -284,7 +260,7 @@ def texture():
rng = np.random.default_rng(SEED)
sheet = Image.new("RGBA", (TEXTURE_W, TEXTURE_H), (0, 0, 0, 0))
# in this order: the stream is shared, so a new cameo goes last and leaves the others as they were
- for name, paint in (("attack", attack), ("hold", hold), ("move", move), ("scout", scout), ("hunt", hunt),
+ for name, paint in (("attack", attack), ("hold", hold), ("move", move), ("hunt", hunt),
("aggressive", aggressive), ("defensive", defensive)):
sheet.paste(cameo(paint(rng)).convert("RGBA"), CAMEO_PLACES[name])
return sheet
@@ -304,14 +280,12 @@ def selfcheck():
assert attack_mid[0] > attack_mid[2], attack_mid
assert hold_mid[2] > hold_mid[0], hold_mid
assert move_side[1] > move_side[0] and move_side[1] > move_side[2], move_side
- # and the four after them: amber, orange, red and steel blue plates
+ # and the three after them: orange, red and steel blue plates
def face(x0, y0, x1, y1):
return np.asarray(sheet.crop((x0, y0, x1, y1)), dtype=int)[:, :, :3].mean(axis=(0, 1))
- scout_top = face(64 + 27, 64 + 6, 64 + 33, 64 + 10)
hunt_foot = face(128 + 16, 32, 128 + 20, 36)
aggressive_foot = face(192 + 27, 34, 192 + 33, 38)
defensive_top = face(128 + 16, 64 + 8, 128 + 20, 64 + 14)
- assert scout_top[0] > 200 and scout_top[1] > 140 and scout_top[2] < 80, scout_top
assert hunt_foot[0] > 160 and 60 < hunt_foot[1] < 140 and hunt_foot[2] < 60, hunt_foot
assert aggressive_foot[0] > 140 and aggressive_foot[1] < 60, aggressive_foot
assert defensive_top[2] > defensive_top[0] + 50, defensive_top