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.
C++ cmakecnccommand-and-conquercppdirectx11game-enginegame-preservationgeneralsrtssage-enginex64zero-hour
feat(gameclient): Classic move ring, EA zoom and no fork bars
Olcay Seyganbf3d0bc5f8d1
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 7e771c5d2..8ed1534dd 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -1087,7 +1087,7 @@ The whole HUD is on the hardware. Four colours carry it, and they mean the same- Display, graphics, effects, audio, controls, gameplay and network, behind seven buttons across the top. The original screen was one panel with everything on it at once, and it was already full the day it shipped: the language filter, the keyboard button and four camera checkboxes are all still in there, parked off the right edge where nobody can reach them, because there was nowhere left to put them.- Classic Graphics, at the top of the Graphics page, puts the game back the way it looked in 2003 in one click: its own textures and ground in place of the upscaled ones, the old hard shadows, the round dark patch under every tree where Reforged lays the tree's own outline on the ground, no bump detail on the models and no glow or sharpening over the picture. Leave it off and you have Reforged. The rest of the options stay yours either way, and the box takes effect the next time the game starts.-- Interface, at the top of the HUD group on the Gameplay page, picks between Classic and Reforged. Classic is the command bar, mouse and hotkeys of Zero Hour 1.04 that your hands still remember; Reforged is the console in the middle, right-click orders and the key grid this version built. Every player starts on Classic, including anyone updating whose settings never named it. The choice is yours alone: two players on different styles still play the same match and the same replay. It takes effect the next time the game starts. Classic's screen is EA's again: the one-piece command bar in each side's own painting, the radar with its flashing under-attack lamp, the beacon button, six lines of messages in the top left that fade as they did, superweapon countdowns written out by name, the old chat line and quit menu, lettering at the old sizes, and Tab opening diplomacy. What it does not do is stretch. On a 16:9 or 21:9 screen the bar, the menus and every dialog sit in a 4:3 frame in the middle at their drawn shape, and the battlefield runs out to both edges past them; at 2560x1080 that is 560 pixels of ground on either side of the bar. The mouse and keys are 1.04's as well. The left button selects and gives the order, so an enemy under it is an attack and a bunker under your infantry is a way in; the right button drops your selection or takes back a half-given order, and a right drag scrolls the map. Ctrl held is force fire. Alt held lays waypoints, and the white path joining them is drawn again. A guard order holds the range it always held, Shift and a number adds that group to what you have selected, and a build button is one unit a click. The keys are your language's own key map from the game's files, with nothing of Reforged's grid laid over it, and a build button's key is the letter painted yellow in its name again. A structure is selected on its own, as it always was. The radar shows no money piles or tech buildings, the piles carry no money over them, and the clock plate, the frame counter and the experience bar under the portrait stay off the screen. So does the peace time plate, though a host's truce still holds. The camera zooms on the middle of the screen, turns without snapping, and scrolls from the last three pixels of a full screen and not at all in a window, whatever the options say. None of it reaches the battle itself: Classic sends the game only the orders 1.04 sent, so a Classic player and a Reforged one share a match, and a replay plays back the same in either.+- Interface, at the top of the HUD group on the Gameplay page, picks between Classic and Reforged. Classic is the command bar, mouse and hotkeys of Zero Hour 1.04 that your hands still remember; Reforged is the console in the middle, right-click orders and the key grid this version built. Every player starts on Classic, including anyone updating whose settings never named it. The choice is yours alone: two players on different styles still play the same match and the same replay. It takes effect the next time the game starts. Classic's screen is EA's again: the one-piece command bar in each side's own painting, the radar with its flashing under-attack lamp, the beacon button, six lines of messages in the top left that fade as they did, superweapon countdowns written out by name, the old chat line and quit menu, lettering at the old sizes, and Tab opening diplomacy. What it does not do is stretch. On a 16:9 or 21:9 screen the bar, the menus and every dialog sit in a 4:3 frame in the middle at their drawn shape, and the battlefield runs out to both edges past them; at 2560x1080 that is 560 pixels of ground on either side of the bar. The mouse and keys are 1.04's as well. The left button selects and gives the order, so an enemy under it is an attack and a bunker under your infantry is a way in; the right button drops your selection or takes back a half-given order, and a right drag scrolls the map. Ctrl held is force fire. Alt held lays waypoints, and the white path joining them is drawn again. A guard order holds the range it always held, Shift and a number adds that group to what you have selected, and a build button is one unit a click. The keys are your language's own key map from the game's files, with nothing of Reforged's grid laid over it, and a build button's key is the letter painted yellow in its name again. A structure is selected on its own, as it always was. The radar shows no money piles or tech buildings, the piles carry no money over them, and the clock plate, the frame counter and the experience bar under the portrait stay off the screen. So does the peace time plate, though a host's truce still holds. A unit's health bar is the bar alone, with no build, reload, charge or work clocks over it, and an upgrade bought for a group of buildings goes to the one whose buttons you see. The building and unit keys are the yellow letters in Turkish as well: İkmal Kamyonu is the i key on a Turkish keyboard, wherever that key sits. In a network game a Classic player's camera is not sent to observers, as it never was in 1.04. The camera zooms on the middle of the screen ten units a notch, between the map's own nearest and farthest heights, turns without snapping, and scrolls from the last three pixels of a full screen and not at all in a window, whatever the options say. A move order puts 1.04's animated ring on the ground where it lands, and no marker or line stays behind it. None of it reaches the battle itself: Classic sends the game only the orders 1.04 sent, so a Classic player and a Reforged one share a match, and a replay plays back the same in either.- Every graphics setting is on the Graphics and Effects pages. Shadows, clouds, ground lighting, soft water edges, trees, extra animations, heat haze, texture resolution and the particle limit used to hide in a popup that only opened if you picked Custom from the detail box on another page, so choosing High never showed you what High turns on. Pick a preset now and its settings change in front of you; touch any one of them and the box reads Custom. Texture filtering and the number of anisotropic samples, which needed a text editor, sit there too.- Every page is sorted into titled groups by what the settings do, and the groups sit in the same three columns on every tab. On Graphics the detail preset heads the first column with the texture and particle sliders under it, the picture settings take the second and the terrain the third. The framed boxes the original drew inside each page are gone. They were sized for headings that no longer exist, which is why no two pages started their first setting at the same height.- The detail box has Ultra above High, and a preset now sets everything it is responsible for. Picking High used to leave antialiasing and texture filtering wherever they happened to be; High now brings 4x antialiasing and 8 anisotropic samples with it, and Low turns both down for the machines that need it. Ultra is High with the particle limit at the top of its slider, 5,000 against High's 3,000, detail that is never dropped when the frame rate dips, 8x antialiasing, 16 anisotropic samples, thick smoke and every new shadow and effect switched on. Glow stays yours whichever you pick: the artwork was painted without it.diff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/InGameUI.h b/GeneralsMD/Code/GameEngine/Include/GameClient/InGameUI.hindex 314a91b24..573771a1d 100644--- a/GeneralsMD/Code/GameEngine/Include/GameClient/InGameUI.h+++ b/GeneralsMD/Code/GameEngine/Include/GameClient/InGameUI.h@@ -605,6 +605,7 @@ public: // ********************************************************************/// in front of it. The logic keeps the list; see OrderQueue.h.void markNextOrderQueued( OrderQueueMode mode );+ void createMoveHint( const GameMessage *msg ); ///< Classic: EA's animated ring where a move order landsvirtual void createAttackHint( const GameMessage *msg ); ///< An attack command has occurred, start graphical "hint"virtual void createForceAttackHint( const GameMessage *msg ); ///< A force attack command has occurred, start graphical "hint"@@ -1446,6 +1447,16 @@ protected:std::list<WindowLayout *> m_windowLayouts;AsciiString m_currentlyPlayingMovie; ///< Used to push updates to TheScriptEngineDrawableList m_selectedDrawables; ///< A list of all selected drawables.++ // Classic's move rings, EA's own: where each move order landed and the client frame it did+ enum { MAX_MOVE_HINTS = 256 };+ struct MoveHintStruct+ {+ Coord3D pos; ///< World coords of destination point+ UnsignedInt frame; ///< frame the command was issued on+ };+ MoveHintStruct m_moveHint[ MAX_MOVE_HINTS ];+ Int m_nextMoveHint;DrawableList m_selectedLocalDrawables; ///< A list of all selected drawables owned by the local playerstd::vector<ObjectID> m_tunnelTripRiders; ///< selected units inside the tunnel network on a move order, selected again when they come outBool m_isDragSelecting; ///< If TRUE, an area selection is in progressdiff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/Drawable.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/Drawable.cppindex caf31a1ab..0fa1f987e 100644--- a/GeneralsMD/Code/GameEngine/Source/GameClient/Drawable.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/Drawable.cpp@@ -4626,6 +4626,11 @@ void Drawable::drawHealthBar(const IRegion2D* healthBarRegion)(healthBoxWidth - 2) * healthRatio, healthBoxHeight - 2,color );+ // Classic's bar is EA's health alone: none of the production, reload, charge or work bars+ // and clocks below+ if( TheGlobalData->isClassicUI() )+ return;+// bars stack upwards from just above the health bar, each clearing the seconds written over// the one below itInt stackY = healthBarRegion->lo.y - 3;diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cppindex a51727b23..f4895820b 100644--- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp@@ -536,6 +536,10 @@ void ControlBar::pressCommandButton( Int place )//-------------------------------------------------------------------------------------------------void ControlBar::makeBuildPageButtons( void ){+ // Classic's command sets are EA's slot for slot: no pages+ if( TheGlobalData->isClassicUI() )+ return;+AsciiString name;for( Int page = 0; page < BUILD_PAGE_COUNT; page++ ){diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBarCommandProcessing.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBarCommandProcessing.cppindex 5318478fc..0128af7bf 100644--- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBarCommandProcessing.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBarCommandProcessing.cpp@@ -721,7 +721,8 @@ CBCommandStatus ControlBar::processCommandUI( GameWindow *control,DEBUG_LOG(("UpgradeSpread player upgrade '%s' ctx %d selCount %d rep obj %d\n",upgradeT->getUpgradeName().str(), (Int)m_currContext,TheInGameUI ? TheInGameUI->getSelectCount() : -1, (Int)obj->getID()));- if( m_currContext == CB_CONTEXT_MULTI_SELECT )+ // Classic buys it from the one object the bar stands for, as the game shipped+ if( m_currContext == CB_CONTEXT_MULTI_SELECT && !TheGlobalData->isClassicUI() )producer = pickUpgradeProducer( upgradeT, obj );ProductionUpdateInterface* pu = producer ? producer->getProductionUpdateInterface() : NULL;@@ -786,9 +787,9 @@ CBCommandStatus ControlBar::processCommandUI( GameWindow *control,// time, since the bar cannot see the queue the previous click just filled until the// next logic frame - so a click on four selected barracks upgraded one of them and// the other three clicks were silently thrown away by the duplicate guard in- // ProductionUpdate::queueUpgrade.+ // ProductionUpdate::queueUpgrade. Classic keeps that one object.//- if( m_currContext == CB_CONTEXT_MULTI_SELECT )+ if( m_currContext == CB_CONTEXT_MULTI_SELECT && !TheGlobalData->isClassicUI() ){Player *player = ThePlayerList->getLocalPlayer();Int purse = player->getMoney()->countMoney();diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cppindex 027d0da5d..c2d05381b 100644--- a/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp@@ -1093,7 +1093,13 @@ InGameUI::InGameUI(){Int i;-+ for( i = 0; i < MAX_MOVE_HINTS; i++ )+ {+ m_moveHint[ i ].pos.zero();+ m_moveHint[ i ].frame = 0;+ }+ m_nextMoveHint = 0;+m_inputEnabled = true;m_isDragSelecting = false;m_isFormationDragging = FALSE;@@ -4236,6 +4242,13 @@ void InGameUI::unregisterWindowLayout( WindowLayout *layout )//-------------------------------------------------------------------------------------------------void InGameUI::reset( void ){+ for( Int i = 0; i < MAX_MOVE_HINTS; i++ )+ {+ m_moveHint[ i ].pos.zero();+ m_moveHint[ i ].frame = 0;+ }+ m_nextMoveHint = 0;+m_isQuitMenuVisible = FALSE;m_scoreboardOpen = FALSE;m_scoreboardPageLoaded = FALSE;@@ -6408,6 +6421,30 @@ void InGameUI::markNextOrderQueued( OrderQueueMode mode )msg->appendIntegerArgument( mode );}+//-------------------------------------------------------------------------------------------------+/** A move command has occurred: Classic starts EA's ring where it lands (W3DInGameUI::drawMoveHints). */+//-------------------------------------------------------------------------------------------------+void InGameUI::createMoveHint( const GameMessage *msg )+{+ if( getSelectCount() == 1 )+ {+ Drawable *draw = getFirstSelectedDrawable();+ Object *obj = draw ? draw->getObject() : NULL;+ if( obj && obj->isKindOf( KINDOF_IMMOBILE ) )+ {+ //Don't allow move hints to be created if our selected object can't move!+ return;+ }+ }++ m_moveHint[ m_nextMoveHint ].frame = TheGameClient->getFrame();+ m_moveHint[ m_nextMoveHint ].pos = msg->getArgument( 0 )->location;++ m_nextMoveHint++;+ if (m_nextMoveHint == InGameUI::MAX_MOVE_HINTS)+ m_nextMoveHint = 0;+}+//-------------------------------------------------------------------------------------------------/** An attack command has occurred, start graphical "hint". *///-------------------------------------------------------------------------------------------------diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/HintSpy.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/HintSpy.cppindex 146ebe547..5049ba0a0 100644--- a/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/HintSpy.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/HintSpy.cpp@@ -130,6 +130,16 @@ GameMessageDisposition HintSpyTranslator::translateGameMessage(const GameMessageTheInGameUI->createGarrisonHint( msg );break;+ //-----------------------------------------------------------------------------+ // Classic's ring where a move lands, EA's own; Reforged draws its order markers instead+ case GameMessage::MSG_DO_MOVETO:+ case GameMessage::MSG_DO_ATTACKMOVETO:+ case GameMessage::MSG_DO_FORCEMOVETO:+ case GameMessage::MSG_ADD_WAYPOINT:+ if( TheGlobalData->isClassicUI() )+ TheInGameUI->createMoveHint( msg );+ break;+}return disp;}diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/LookAtXlat.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/LookAtXlat.cppindex c82e1ae5a..1c1ff8455 100644--- a/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/LookAtXlat.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/LookAtXlat.cpp@@ -239,7 +239,8 @@ static const UnsignedInt CAMERA_NETWORK_FRAMES = LOGICFRAMES_PER_SECOND / 5;* machines, only from somebody still playing, and only when it moved since the last one went. */Bool LookAtTranslator::networkCameraDue( const ViewLocation &view ){- if( !TheGameLogic->isInMultiplayerGame() || !ThePlayerList->getLocalPlayer()->isPlayerActive() )+ // Classic sends what the game as shipped sent, and that was no camera in a network game+ if( TheGlobalData->isClassicUI() || !TheGameLogic->isInMultiplayerGame() || !ThePlayerList->getLocalPlayer()->isPlayerActive() )return FALSE;const UnsignedInt frame = TheGameLogic->getFrame();diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/View.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/View.cppindex 806e3d9d2..b4a63cf5f 100644--- a/GeneralsMD/Code/GameEngine/Source/GameClient/View.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/View.cpp@@ -167,7 +167,8 @@ View *View::prependViewToList( View *list )// EA's step was 10 world units. The reachable band is 90 (MinCameraHeight * CLOSEST_ZOOM_FACTOR)// to about 900 (MaxCameraHeight * ZOOM_OUT_LIMIT_FACTOR), so crossing it would take about 80// notches - a whole wheel's travel to go from the ground to the whole map. 60 puts it at about 14.-#define ZOOM_STEP_HEIGHT (60.0f)+// Classic keeps EA's 10.+#define ZOOM_STEP_HEIGHT (TheGlobalData->isClassicUI() ? 10.0f : 60.0f)//-------------------------------------------------------------------------------------------------/** The zoom a match opens at. StartAtMaxZoom opens it as far out as the wheel itself may go ratherdiff --git a/GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameClient/W3DInGameUI.h b/GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameClient/W3DInGameUI.hindex 6e3a67f05..6e9cb2491 100644--- a/GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameClient/W3DInGameUI.h+++ b/GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameClient/W3DInGameUI.h@@ -102,6 +102,11 @@ protected:enum { MAX_ORDER_STEP_NUMBERS = 30 };DisplayString *m_orderStepNumbers[ MAX_ORDER_STEP_NUMBERS ];+ // Classic's move rings, EA's own+ void drawMoveHints( View *view );+ RenderObjClass *m_moveHintRenderObj[ MAX_MOVE_HINTS ];+ HAnimClass *m_moveHintAnim[ MAX_MOVE_HINTS ];+}; // end class W3DInGameUI#endif // end __W3DINGAMEUI_H_diff --git a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DInGameUI.cpp b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DInGameUI.cppindex a6255e391..05766cdf7 100644--- a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DInGameUI.cpp+++ b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DInGameUI.cpp@@ -300,6 +300,12 @@ W3DInGameUI::W3DInGameUI()for( Int i = 0; i < MAX_ORDER_STEP_NUMBERS; ++i )m_orderStepNumbers[ i ] = NULL;+ for( Int i = 0; i < MAX_MOVE_HINTS; i++ )+ {+ m_moveHintRenderObj[ i ] = NULL;+ m_moveHintAnim[ i ] = NULL;+ }+} // end W3DInGameUI//-------------------------------------------------------------------------------------------------@@ -323,6 +329,12 @@ W3DInGameUI::~W3DInGameUI()m_orderStepNumbers[ i ] = NULL;}+ for( Int i = 0; i < MAX_MOVE_HINTS; i++ )+ {+ REF_PTR_RELEASE( m_moveHintRenderObj[ i ] );+ REF_PTR_RELEASE( m_moveHintAnim[ i ] );+ }+} // end ~W3DInGameUI// loadText ===================================================================@@ -431,12 +443,14 @@ void W3DInGameUI::draw( void )drawFormationLine();// Classic draws what the game as shipped drew: none of the threads, plan numbers, ally pointers- // or guard shields below, and its waypoint path is W3DWaypointBuffer's. It keeps the order- // markers, without their threads, in place of EA's ground ring, which is gone from this tree+ // or guard shields below, and its waypoint path is W3DWaypointBuffer's. A move order gets+ // EA's animated ground ring (drawMoveHints) in place of the order markersconst Bool classic = TheGlobalData->isClassicUI();- // and where everything selected is headed, drag or no drag- drawOrderHints();+ // and where everything selected is headed, drag or no drag. Classic has EA's ring instead,+ // drawMoveHints below+ if( !classic )+ drawOrderHints();// and which of the plans each builder puts up nextif( !classic )@@ -478,6 +492,9 @@ void W3DInGameUI::draw( void ){// draw attack hints+ // draw move hints+ drawMoveHints( view );+drawAttackHints( view );// draw placement angle selection if needed@@ -1609,6 +1626,75 @@ void W3DInGameUI::drawAllyCursors( void )} // end drawAllyCursors+//-------------------------------------------------------------------------------------------------+/** Classic: EA's animated ring on the ground where a move order landed, 40 client frames each.+ * EA's own code, deleted by fec052cc, back for Classic only (InGameUI::createMoveHint fills it). */+//-------------------------------------------------------------------------------------------------+void W3DInGameUI::drawMoveHints( View *view )+{+ const Bool classic = TheGlobalData->isClassicUI();+ for( Int i = 0; i < MAX_MOVE_HINTS; i++ )+ {+ Int elapsed = TheGameClient->getFrame() - m_moveHint[i].frame;++ if( classic && m_moveHint[ i ].frame != 0 && elapsed <= 40 )+ {+ // create render object and add to scene of needed+ if( m_moveHintRenderObj[ i ] == NULL )+ {+ RenderObjClass *hint = W3DDisplay::m_assetManager->Create_Render_Obj(TheGlobalData->m_moveHintName.str());++ AsciiString animName;+ animName.format("%s.%s", TheGlobalData->m_moveHintName.str(), TheGlobalData->m_moveHintName.str());+ HAnimClass *anim = W3DDisplay::m_assetManager->Get_HAnim(animName.str());++ if( hint == NULL )+ {+ REF_PTR_RELEASE( anim );+ return;+ }++ m_moveHintRenderObj[ i ] = hint;+ // 'anim' comes back from Get_HAnim with an AddRef already+ REF_PTR_RELEASE(m_moveHintAnim[i]);+ m_moveHintAnim[i] = anim;+ }++ // show the render object if hidden+ if( m_moveHintRenderObj[ i ]->Is_Hidden() == 1 ) {+ m_moveHintRenderObj[ i ]->Set_Hidden( 0 );+ W3DDisplay::m_3DScene->Add_Render_Object( m_moveHintRenderObj[ i ] );+ if (m_moveHintAnim[i])+ m_moveHintRenderObj[i]->Set_Animation(m_moveHintAnim[i], 0, RenderObjClass::ANIM_MODE_ONCE);+ }++ // move this hint render object to the position and align with terrain+ Matrix3D transform;+ PathfindLayerEnum layer = TheTerrainLogic->alignOnTerrain( 0, m_moveHint[ i ].pos, true, transform );++ Real waterZ;+ if (layer == LAYER_GROUND && TheTerrainLogic->isUnderwater(m_moveHint[ i ].pos.x, m_moveHint[ i ].pos.y, &waterZ))+ {+ Coord3D tmp = m_moveHint[ i ].pos;+ tmp.z = waterZ;+ Coord3D normal;+ normal.x = 0;+ normal.y = 0;+ normal.z = 1;+ makeAlignToNormalMatrix(0, tmp, normal, transform);+ }++ m_moveHintRenderObj[ i ]->Set_Transform( transform );+ }+ else if( m_moveHintRenderObj[ i ] && m_moveHintRenderObj[ i ]->Is_Hidden() == 0 )+ {+ // hide hint marker+ m_moveHintRenderObj[ i ]->Set_Hidden( 1 );+ W3DDisplay::m_3DScene->Remove_Render_Object( m_moveHintRenderObj[ i ] );+ }+ }+}+//-------------------------------------------------------------------------------------------------/** Draw visual back for clicking to attack a unit in the world *///-------------------------------------------------------------------------------------------------diff --git a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DView.cpp b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DView.cppindex 0cee3406e..9fdea701d 100644--- a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DView.cpp+++ b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DView.cpp@@ -324,9 +324,9 @@ void W3DView::setOrigin( Int x, Int y)// how far past the map's default max camera height the player may zoom out by hand.// only the manual zoom limit is stretched - the default/scripted views still use// m_maxHeightAboveGround, so a map still opens framed the way its author meant it to.-// 2.9 puts the ceiling at 899 over GameData.ini's MaxCameraHeight of 310; it was 3.2 (992), and-// Classic keeps 3.2.-#define ZOOM_OUT_LIMIT_FACTOR (TheGlobalData->isClassicUI() ? 3.2f : 2.9f)+// 2.9 puts the ceiling at 899 over GameData.ini's MaxCameraHeight of 310; it was 3.2 (992).+// Classic is EA's: the hand zoom stops at the map's own maximum, a factor of 1.+#define ZOOM_OUT_LIMIT_FACTOR (TheGlobalData->isClassicUI() ? 1.0f : 2.9f)void W3DView::buildCameraTransform( Matrix3D *transform ){Vector3 sourcePos, targetPos;diff --git a/GeneralsMD/Code/Tests/test_camera_behavior.inc b/GeneralsMD/Code/Tests/test_camera_behavior.incindex 6e44aa9d0..5845de286 100644--- a/GeneralsMD/Code/Tests/test_camera_behavior.inc+++ b/GeneralsMD/Code/Tests/test_camera_behavior.inc@@ -255,10 +255,10 @@ TEST(ctrl_wheel_zooms_five_notches_for_one)f.keyboard.modifiers(KEY_STATE_LSHIFT);CHECK_NEAR(1000.0f - heightAfterOneNotch(), plain, 0.01f);- // Classic's Ctrl is force fire and its wheel is one notch a notch+ // Classic's Ctrl is force fire and its wheel is EA's: one notch, ten units, Ctrl or notf.global->m_interfaceStyleInUse = INTERFACE_STYLE_CLASSIC;f.keyboard.modifiers(KEY_STATE_LCONTROL);- CHECK_NEAR(1000.0f - heightAfterOneNotch(), plain, 0.01f);+ CHECK_NEAR(1000.0f - heightAfterOneNotch(), 10.0f, 0.01f);}TEST(edge_scroll_ramps_from_the_band_to_the_old_three_pixels)