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(ai): walk to a boneless dock instead of docking in place
Olcay Seygan846c0b14b286
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex d6ec3339c..4a0535fd4 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -384,7 +384,7 @@ found and fixed — EA's own, not port damage.**- That bar is now the work itself. A worker used to reset it to empty at the very moment it finished and then walk away, so every trip looked like it left mid-handover; and after taking its last box it stood at the pile for one more full loading cycle, taking nothing. It leaves the instant the load is done - which is a little more money per trip, on every worker you own.- A worker loads in one go instead of a box at a time. It used to take one, wait a loading cycle, take the next, wait again, and the bar over its head restarted for each of them; now the whole load changes hands once and the wait is that load's worth of time - four boxes cost what four boxes always cost, in one stretch rather than four. Money in the bank is unchanged, which is the point: three headless matches on the same seeds came back within a few percent of what they earned before.- Supply points refill themselves, slowly, and faster the more of a base has grown around them. A warehouse used to be a fixed lump of money that ran out and left the map with nothing to fight over: whoever mined out the middle first had the game, and the second half of every match was played on income neither side could earn any more. A box comes back every forty seconds standing on its own, every twenty with one supply centre built near it, every thirteen with two - up to what the point started with, never past it. Both sides expanding onto the same patch make it richer and then have to decide which of them keeps it.-- Workers stop hesitating on their way in and out. A dock has a queue outside it and a worker treated its place in that queue as a destination: it drove to the spot, stopped dead, waited a frame, drove to the door, stopped again, and only then went in - twice a load, and nearly every load with nothing else queued. With the dock empty it drives straight in.+- Workers stop hesitating on their way in and out. A dock has a queue outside it and a worker treated its place in that queue as a destination: it drove to the spot, stopped dead, waited a frame, drove to the door, stopped again, and only then went in - twice a load, and nearly every load with nothing else queued. With the dock empty it drives straight in. The first version of that also skipped the walk to a supply pile or a GLA stash, which have no door of their own, so a worker a long way off played its loading animation where it stood and was paid anyway. In a four-player test match 72 loads were picked up or dropped off away from the dock, one of them 613 feet from it; now there are none.- Hackers show how far off the next payout is. So do the black market and the oil derricks.- A hacker working from inside an Internet Center shows what it earns. The green figure floats over the building on every payout, the way it does over one sitting in the field. It never appeared, because the game asked the hacker whether it could be seen and a garrisoned unit is not drawn at all - which is the one place a hacker is meant to work.- Factories take a hundred units in the queue, not nine. The build queue only ever had nine buttons and that had become the limit.diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/AI/AIDock.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/AI/AIDock.cppindex 50dcca1e5..d00b1e827 100644--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/AI/AIDock.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/AI/AIDock.cpp@@ -210,8 +210,15 @@ StateReturnType AIDockApproachState::onEnter( void )// centre. Taking the slot and reporting it reached without driving to it hands the dock to the// next state a frame later; the queue behind is unaffected, because there is nobody in it.//+ // Only for a dock with an entry point of its own. One without the bones - a supply pile, a GLA+ // stash - names wherever the docker stands as its entry and its pad, so the approach walk is the+ // only thing that brings the docker to it; skip that and the load is taken where the worker was.+ //+ Coord3D enterPosition;+ dock->getEnterPosition( getMachineOwner(), &enterPosition );if( dock->getActiveDocker() == INVALID_ID- && ( (AIDockMachine*)getMachine() )->m_approachPosition == 0 )+ && ( (AIDockMachine*)getMachine() )->m_approachPosition == 0+ && !( enterPosition == *getMachineOwner()->getPosition() ) ){dock->onApproachReached( getMachineOwner() );return STATE_SUCCESS;