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(w3ddevice): translate radar blip colours where they are drawn
Olcay Seygan30d1711f956f
diff --git a/GeneralsMD/Code/GameEngine/Source/Common/System/Radar.cpp b/GeneralsMD/Code/GameEngine/Source/Common/System/Radar.cppindex ab9c706a1..98bf8a656 100644--- a/GeneralsMD/Code/GameEngine/Source/Common/System/Radar.cpp+++ b/GeneralsMD/Code/GameEngine/Source/Common/System/Radar.cpp@@ -458,13 +458,16 @@ void Radar::addObject( Object *obj )useIndicatorColor = false;}+ // the colour the match agreed on, not the one this screen draws. A blip is created once and+ // read every frame after that, so the scheme is applied where it is drawn: otherwise a unit+ // built before the setting was changed keeps the old colour until it dies.if( useIndicatorColor || (player == NULL) ){- newObj->setColor( clientColor( obj->getIndicatorColor() ) );+ newObj->setColor( obj->getIndicatorColor() );}else{- newObj->setColor( clientPlayerColor( player ) );+ newObj->setColor( player->getPlayerColor() );}// set a chunk of radar data in the objectdiff --git a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/Common/System/W3DRadar.cpp b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/Common/System/W3DRadar.cppindex feba4c71d..f97d7cb1d 100644--- a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/Common/System/W3DRadar.cpp+++ b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/Common/System/W3DRadar.cpp@@ -45,6 +45,7 @@#include "GameClient/GameWindow.h"#include "GameClient/Image.h"#include "GameClient/Line2D.h"+#include "GameClient/PlayerColorScheme.h"#include "GameClient/TerrainVisual.h"#include "GameClient/Water.h"#include "W3DDevice/Common/W3DRadar.h"@@ -683,7 +684,7 @@ void W3DRadar::renderObjectList( const RadarObject *listHead, TextureClass *textcontinue;// get the color we're going to draw in- Color c = rObj->getColor();+ Color c = clientColor( rObj->getColor() );@@ -1551,7 +1552,7 @@ void W3DRadar::refreshTerrain( TerrainLogic *terrain )// if( obj->getRadarPriority() == RADAR_PRIORITY_LOCAL_UNIT_ONLY )// ML-- What the heck is this? local-only and neutral-observier-viewed units are stealthy?? Since when?// Now it twinkles for any stealthed object, whether locally controlled or neutral-observier-viewed- c = rObj->getColor();+ c = clientColor( rObj->getColor() );if( g & r ){