Skip to content

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.

fix(gameengine): a scenario spawn refreshes the command bar

Olcay Seyganbd857d77583c
diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/System/ScenarioDrill.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/System/ScenarioDrill.cpp
index 810dc36a9..fb200d07a 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/System/ScenarioDrill.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/System/ScenarioDrill.cpp
@@ -626,6 +626,9 @@ static Bool spawnOne( const ThingTemplate *tmpl, Team *team, const Coord3D *pos
create->onBuildComplete();
}
+ // a capture refreshes the bar the same way; without it a spawned superweapon waits for a click
+ TheControlBar->markUIDirty();
+
team->setActive();
TheAI->pathfinder()->addObjectToPathfindMap( obj );
return TRUE;