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): flash a capture in the colour scheme's colour
Olcay Seygan08fe38719628
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex f8fc509af..bb58487c2 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -648,6 +648,7 @@ found and fixed — EA's own, not port damage.**- The colour reaches everything: the tint on the models, the radar, health bars, selection rings, the score screen, the money that floats up from a supply drop.- Your screen only. Nobody else in the match sees your choice, nothing about the game itself changes, and two people in the same game can run different settings. Original is the default and nothing changes until you pick something else.- Switch it mid-match and the map repaints itself. So does the picture when an alliance is made or broken by a map script.+- A building being captured flashes in the capturer's colour from the setting too. It used to blink in the capturer's original colour while that player's units, radar dots and capture clock showed the new one. The flash on a selected unit and the flashes a mission script asks for follow the setting the same way.- The player names on an observer's command bar follow the setting as well. They used to keep whatever colour they were given when the bar first filled, which was sometimes black.## You can see where your ally is pointingdiff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/Drawable.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/Drawable.cppindex 78d2f7973..05e91d085 100644--- a/GeneralsMD/Code/GameEngine/Source/GameClient/Drawable.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/Drawable.cpp@@ -1365,7 +1365,7 @@ void Drawable::updateDrawable( void )if (m_flashCount > 0 && (TheGameClient->getFrame() % DRAWABLE_FRAMES_PER_FLASH) == 0){RGBColor tmp;- tmp.setFromInt(m_flashColor);+ tmp.setFromInt(clientColor(m_flashColor));colorFlash(&tmp);m_flashCount--;}@@ -1494,7 +1494,7 @@ void Drawable::flashAsSelected( const RGBColor *color ) ///< drawable takes care{RGBColor tempColor;if (TheGlobalData->m_selectionFlashHouseColor)- tempColor.setFromInt(obj->getIndicatorColor());+ tempColor.setFromInt(clientColor(obj->getIndicatorColor()));elsetempColor.setFromInt(0xffffffff);//whitediff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/SpecialAbilityUpdate.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/SpecialAbilityUpdate.cppindex 42eec453f..cded6c301 100644--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/SpecialAbilityUpdate.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/SpecialAbilityUpdate.cpp@@ -45,6 +45,7 @@#include "GameClient/FXList.h"#include "GameClient/Eva.h"#include "GameClient/InGameUI.h"+#include "GameClient/PlayerColorScheme.h"#include "GameClient/ControlBar.h"#include "GameClient/GameText.h"@@ -1266,7 +1267,9 @@ Bool SpecialAbilityUpdate::continuePreparation(){RGBColor myHouseColor;- myHouseColor.setFromInt( getObject()->getIndicatorColor() );+ // the colour the capturer is drawn in on this screen, which the colour scheme option may+ // have changed; it only tints the flash, so nothing in the simulation reads it+ myHouseColor.setFromInt( clientColor( getObject()->getIndicatorColor() ) );Real saturation = TheGlobalData->m_selectionFlashSaturationFactor;targetDraw->saturateRGB( myHouseColor, saturation );