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(gameclient): keep health bars in -directorrecord films
Olcay Seygane133668380f3
diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/Drawable.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/Drawable.cppindex 1b7a89907..4cd530320 100644--- a/GeneralsMD/Code/GameEngine/Source/GameClient/Drawable.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/Drawable.cpp@@ -3175,8 +3175,10 @@ void Drawable::drawIconUI( void )/* -cinema takes the interface off, and these are interface: the health bar, the rank chevrons apromotion puts up, the healing cross, the ammo pips, the capture clock and the captions. Thegate is here rather than on TheGameLogic's own m_drawIconUI because that one is logic state,- saved with the game and carried in the network snapshot; footage must not touch it. */- if( CinemaDirector_hidesHud() )+ saved with the game and carried in the network snapshot; footage must not touch it.+ -directorrecord keeps the health bar alone: a cup film has to show who is losing a fight. */+ const Bool barOnly = CinemaDirector_hidesHud();+ if( barOnly && !TheGlobalData->m_directorRecord )return;if( TheGameLogic->getDrawIconUI() && (TheScriptEngine->getFade()==ScriptEngine::FADE_NONE) )@@ -3193,8 +3195,10 @@ void Drawable::drawIconUI( void )return;//Icons that can be drawn on dead things- drawHealthBar( healthBarRegion );- drawEmoticon( healthBarRegion );+ drawHealthBar( healthBarRegion );+ if( barOnly )+ return;+ drawEmoticon( healthBarRegion );drawCaption( healthBarRegion );drawConstructPercent( healthBarRegion );diff --git a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DView.cpp b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DView.cppindex 42c7cf52a..8a7900cc2 100644--- a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DView.cpp+++ b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DView.cpp@@ -1574,8 +1574,9 @@ static void drawablePostDraw( Drawable *draw, void *userData )if (draw->isDrawableEffectivelyHidden() || FXPitch < 0.0f)return;- // -cinema: no health bars, ranks or captions over the units- if (CinemaDirector_hidesHud())+ // -cinema: no health bars, ranks or captions over the units (-directorrecord keeps the bars,+ // Drawable::drawIconUI)+ if (CinemaDirector_hidesHud() && !TheGlobalData->m_directorRecord)return;Object* obj = draw->getObject();