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
fix(w3ddevice): keep queue and waypoint lines with order lines off
Olcay Seyganfec8baedbdb6
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 8e14c4e4b..a40305284 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -1302,7 +1302,7 @@ The whole HUD is on the hardware. Four colours carry it, and they mean the same- The promotion screen closes when you press its key again, however fast you press it. The screen fades in, and the fade drives the window itself for several frames either way - so a second press during the fade read the screen as still shut and opened it again, and a press just after it was closed was undone by the fade's next frame.- The command bar stops changing under you while you are using it. With nothing selected the bar shows one of your builders so you can place a structure without picking a dozer first, and it showed whichever one happened to be idle - so a dozer finishing a building on the far side of the base took the bar over, dropping a half-typed build hotkey and taking the structure off your cursor. The builder you are working with keeps the bar.- The command bar's artwork moves with the command bar. Minimising it slid the buttons off the bottom of the screen and left the metal they sit on painted over the battlefield; the same painting stood still through the slide the bar makes when a match opens. It travels with the bar and goes with it.-- The lines from your selection to where it is headed can be switched off. Options > Interface has an Order Lines box, on by default. Off, a selected unit shows no line to its goal and none through its queue, but the marker on every point it is headed for stays, so an attack move or a string of waypoints is still there to see. The line you draw while dragging a formation still shows, because that one is the order being given. It changes the moment you press Accept.+- The lines from your selection to where it is headed can be switched off. Options > Interface has an Order Lines box, on by default. Off, a unit sent to one place shows no line to it, only the marker on the spot. A shift queue and a waypoint path keep their lines, stop to stop, and a building's rally line stays too: those are plans you are still reading, and with the box off v3.0.0 took their lines away as well. The line you draw while dragging a formation still shows, because that one is the order being given. It changes the moment you press Accept.- Zoom to cursor is a box on Options > Controls again, in Classic and Reforged, and starts unticked: the wheel zooms on the middle of the screen, as it did in 1.04, until you ask for the cursor. A tick saved while it defaulted on does not carry over. It also stopped fighting you. The camera corrected itself a frame after each step of the zoom, so the ground slid off the cursor and was pulled back the whole way in, and the last pull landed after the zoom had finished, as a small jump towards the cursor. And a wheel spun over a spot with no ground under it, out past the edge of the map, threw the camera to the corner of the map. The ground under the cursor stays under it on every frame now, and a spot with no ground zooms on the middle of the screen.- Scrolling keeps up with the zoom. The camera moved the same distance over the ground at every height, so right down on the ground the map flew past and from the farthest zoom it crawled, ten times slower across the screen, and turning the scroll speed up hardly showed. The pace now follows the zoom: where a map opens it is exactly what it was, zoomed out it covers ground as fast as the picture shows it, and the scroll speed slider sets that pace at every height. Arrow keys, the screen's edges and a right drag all go by it, in Classic and Reforged alike.- Orders land where you clicked when the camera is right down on the ground. Zoomed all the way in, a right click sent the units to the corner of the map instead of to the spot under the pointer, and the marker and the line went there with them. The game works out what you clicked on by firing a line from the camera at the ground, and that line was thrown away whenever the camera itself had dropped below the height of the tallest hill on the map - so it went wrong on hilly maps first and stayed fine on flat ones, which is why it looked random.diff --git a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3dWaypointBuffer.cpp b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3dWaypointBuffer.cppindex eb894f4bd..fc58cc5d7 100644--- a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3dWaypointBuffer.cpp+++ b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3dWaypointBuffer.cpp@@ -223,13 +223,17 @@ void W3DWaypointBuffer::drawWaypoints(RenderInfoClass &rinfo)points[ 0 ].Set( it->from.x, it->from.y, max( it->from.z, TheTerrainLogic->getGroundHeight( it->from.x, it->from.y ) ) );points[ 1 ].Set( it->to.x, it->to.y, max( it->to.z, TheTerrainLogic->getGroundHeight( it->to.x, it->to.y ) ) );- // Order Lines off in the options takes the lines away and leaves the points- if( TheGlobalData->m_showOrderLines )+ // Order Lines off in the options takes away the line of a plain one-point order and leaves+ // its point. A unit with more than one place to go (a shift queue, a waypoint path; step+ // is numbered then) keeps its threads, since that list is the thing being planned+ const Bool lineShown = TheGlobalData->m_showOrderLines || it->step > 0+ || it->kind == InGameUI::ORDER_HINT_WAYPOINT;+ if( lineShown )queueLine( 2, points );- // with the lines on, the end of the line wears the puck the joints between orders do+ // with the line drawn, its end wears the puck the joints between orders doif( it->mark == InGameUI::ORDER_MARK_JOINT- || ( TheGlobalData->m_showOrderLines && it->mark == InGameUI::ORDER_MARK_FLAG ) )+ || ( lineShown && it->mark == InGameUI::ORDER_MARK_FLAG ) ){m_waypointNodeRobj->Set_Position( points[ 1 ] );WW3D::Render( *m_waypointNodeRobj, localRinfo ); // the little hockey puck