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): only a site's owner can resume its construction
Olcay Seygand75906d96a83
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 54b7b2985..b0cc749e0 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -416,6 +416,7 @@ found and fixed — EA's own, not port damage.**- Ten more places that wrote terrain, roads, bridges, trees, foundations and scorch marks into a buffer the graphics card had refused to hand over. Every one of them wrote to address zero instead, and a graphics device pulled out from under the game is all it takes; the frame is simply skipped now.- Tank tracks no longer crash the game. The renderer has to borrow the buffer it writes them into, and when that request failed, which is what a graphics device pulled out from under the game does, the tracks were written to address zero anyway. Two more of the same shape went with it: the screenshot path and the texture size lookup both used a pointer that the failing call had never filled in. Three of those texture lookups also leaked the surface they asked about, once per procedural texture, for the life of the process.- Double-clicking a menu button opens the screen once. The button stays live while the old screen animates out, so the second click started the same transition again and the screen opened twice, one copy left drawn over whatever came next and doing nothing sensible when clicked.+- Pointing a worker at an ally's half-finished building no longer offers to finish it. The cursor promised to resume construction and the order it gave did nothing, because the check behind the cursor asked whether you were allied with whoever owned the site, and you are allied with yourself.- Double-tapping 0 jumps the camera to that group.- The mouse wheel no longer cancels a camera move already in progress.diff --git a/GeneralsMD/Code/GameEngine/Source/Common/RTS/ActionManager.cpp b/GeneralsMD/Code/GameEngine/Source/Common/RTS/ActionManager.cppindex 6d3295347..4875d752f 100644--- a/GeneralsMD/Code/GameEngine/Source/Common/RTS/ActionManager.cpp+++ b/GeneralsMD/Code/GameEngine/Source/Common/RTS/ActionManager.cpp@@ -481,10 +481,12 @@ Bool ActionManager::canResumeConstructionOf( const Object *obj,if( obj->isKindOf( KINDOF_DOZER ) == FALSE )return FALSE;- Relationship r = obj->getRelationship(objectBeingConstructed);-- // only available to our allies- if( r != ALLIES )+ //+ // only the owner can resume it. The old test was `getRelationship() == ALLIES`, which is true+ // for your own objects *and* an ally's, so hovering a dozer over an ally's half-built structure+ // showed the "resume construction" cursor for an order the construction code then refused.+ //+ if( obj->getControllingPlayer() != objectBeingConstructed->getControllingPlayer() )return FALSE;// if the objectBeingConstructed is not actually under construction we can't resume that!