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(gameengine): give every player's workers the computer's scan range
Olcay Seygan9d765ac8750a
diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/SupplyTruckAIUpdate.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/SupplyTruckAIUpdate.cppindex 4958eb85b..9658d2567 100644--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/SupplyTruckAIUpdate.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/SupplyTruckAIUpdate.cpp@@ -264,11 +264,8 @@ Real SupplyTruckAIUpdate::getDockActionProgress() const//-------------------------------------------------------------------------------------------------Real SupplyTruckAIUpdate::getWarehouseScanDistance() const{- // Ai players get larger scan range. jba.- if (getObject()->getControllingPlayer()->getPlayerType() == PLAYER_COMPUTER) {- return 2 * getSupplyTruckAIUpdateModuleData()->m_warehouseScanDistance;- }- return getSupplyTruckAIUpdateModuleData()->m_warehouseScanDistance;+ // The computer's reach, for everybody, as in WorkerAIUpdate::getWarehouseScanDistance.+ return 2 * getSupplyTruckAIUpdateModuleData()->m_warehouseScanDistance;}// ------------------------------------------------------------------------------------------------diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/WorkerAIUpdate.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/WorkerAIUpdate.cppindex 212388c15..7eed5907b 100644--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/WorkerAIUpdate.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate/WorkerAIUpdate.cpp@@ -262,11 +262,9 @@ Real WorkerAIUpdate::getDockActionProgress() const//-------------------------------------------------------------------------------------------------Real WorkerAIUpdate::getWarehouseScanDistance() const{- // Ai players get larger scan range. jba.- if (getObject()->getControllingPlayer()->getPlayerType() == PLAYER_COMPUTER) {- return 2 * getWorkerAIUpdateModuleData()->m_warehouseScanDistance;- }- return getWorkerAIUpdateModuleData()->m_warehouseScanDistance;+ // The computer's reach, for everybody: at the INI's own figure a human's workers went home+ // from any pile they could see but not reach in 700 feet. INI files are in the checksum.+ return 2 * getWorkerAIUpdateModuleData()->m_warehouseScanDistance;}//-------------------------------------------------------------------------------------------------