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(gameclient): hide container pips while a building is under construction

Olcay Seygan4626406ac462
diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/Drawable.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/Drawable.cpp
index b42e3bd28..1c06ee03c 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameClient/Drawable.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/Drawable.cpp
@@ -2944,6 +2944,10 @@ void Drawable::drawContained( const IRegion2D *healthBarRegion )
if (!container)
return;
+ // a building being put up cannot hold anyone yet, so its (empty) pips are just noise
+ if (obj->getStatusBits().test( OBJECT_STATUS_UNDER_CONSTRUCTION ))
+ return;
+
// container pips are always on for own objects (was: only when selected or moused over)
if (!(
TheGlobalData->m_showObjectHealth &&