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 the director driving, bare board emblems, flags unclickable
Olcay Seygan76ea936d1086
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 481d17caf..06be47717 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -484,20 +484,20 @@ found and fixed — EA's own, not port damage.**- Every row and every countdown stands in real metal, cut from the same tray the general's powers sit in down in the corner - the side your command bar is showing. Watching a match there is no bar of your own, so the superweapon countdowns used to fall back to a flat black box for the whole match; now they wear the metal of the player you are watching, and follow it when you switch seats.- Watching, the command bar is down to the radar. The list of players it held is the row of seats across the top of the screen now: click a seat and you are looking at that player, his money and his side's steel, the way his button in the list did, and the seat is lit gold. Click it again for everybody. A seat click drops whatever you had selected, so the promotions on screen are that player's and not the owner of the tank you last clicked, and the seat stays yours when you click empty ground. The portrait panel in the right corner comes up when you select something and goes when you click empty ground, so an empty match leaves the bottom of the screen to the battle.- Watching, the bars over the buildings are everyone's too - what each factory is turning out, and how long the superweapons have left. An observer used to see none of it.-- Watching, the camera can drive itself. Two drop-downs in the camera panel on the right, above the board, say who has it and which player you follow, and you can follow nobody. The Director goes wherever the most things were hit in the last five seconds, stays with that fight at least six seconds, and cuts away only for one clearly bigger, so a 4v4 is watched like a broadcast rather than hunted for; with a player picked it keeps to the fights he is in. Player camera shows his screen: a human player's camera comes over the network five times a second, smoothed in between, and a computer player, who has no camera, gets the Director narrowed to his own fights. Scroll, turn the view or click the radar and the camera is yours again, still following the same player. In a replay with the recorded camera switched on in the options, a seat click still follows that player the way it always did.+- Watching, the camera can drive itself. Two drop-downs in the camera panel on the right, above the board, say who has it and which player you follow, and you can follow nobody. The Director goes wherever the most things were hit in the last five seconds, stays with that fight at least six seconds, and cuts away only for one clearly bigger, so a 4v4 is watched like a broadcast rather than hunted for; with a player picked it keeps to the fights he is in. Player camera shows his screen: a human player's camera comes over the network five times a second, smoothed in between, and a computer player, who has no camera, gets the Director narrowed to his own fights. Scroll with the keys or a drag, turn the view or click the radar and the camera is yours again, still following the same player. The edge of the screen does not scroll while it drives: the flags along the top and the panel on the right stand on those edges, and reaching for them used to hand the camera back to you, so the Director stopped following the fighting the first time you went to change a setting. In a replay with the recorded camera switched on in the options, a seat click still follows that player the way it always did.- Watching, tick Fog of war under the camera and you see what the player you follow sees and nothing more: black where he has never been, grey where he has been, none of the enemy he cannot see, and an enemy base as he last saw it. Stealth goes by his eyes too: a Jarmen Kell he has not found is gone from the screen and the radar, and his own stealthed units show the way they show him. It stays on whoever drives the camera, until you switch it off or follow nobody. Switch to another player and his fog comes in whole, shadows included: a building he has never seen casts nothing on his grey ground. An observer used to have no fog at all: the whole map, all match, with no way to see the game the way one of its players was seeing it.- An ally, and anyone watching, now sees a stealthed unit's muzzle flash, its promotion and the cash it earns - if they can see the unit at all. Those three asked 'is it mine' instead of 'can I see it', so allies and observers got nothing.- Watching, the match opens on the middle of the map. An observer has no start position, so the game looked for the camera waypoint of "player zero", did not find it, and fell back to the corner of the map: every match watched from the stands began pointed at empty ground in the south west.- Watching, you can click a stealth building. The rule that stops you selecting an enemy you cannot see never asked who was asking, so an observer, and a player already knocked out, could see a stealthed structure on the map and not pick it up to read it. A spectator commands nothing and sees everything already, so there is nothing there to give away.- Watching, the promotions every general has bought are on screen the whole match: a strip of them in the bottom right corner, one row per player in his own colour. There was nowhere else to find this out - the promotion screen filled itself in with the watcher's own player, who has no general and no command sets at all, so a spectator got a blank screen.-- Watching, clicking one player's unit is clicking his seat at the top, and clicking empty ground puts the whole match back. The screen wears his side's metal and the promotions on the right are his alone. The tilde key, or the general's stars on the right of the bar, then opens his promotion screen, on his side's artwork, with his skill points and his rank - greyed out, because they are not yours to spend. With nothing selected the key does nothing and the stars are dark; there is no one general to show.+- Watching, clicking one player's unit watches him, and clicking empty ground puts the whole match back. The screen wears his side's metal and the promotions on the right are his alone. The tilde key, or the general's stars on the right of the bar, then opens his promotion screen, on his side's artwork, with his skill points and his rank - greyed out, because they are not yours to spend. With nothing selected the key does nothing and the stars are dark; there is no one general to show.- A general who has taken Artillery Barrage to level 3 shows one Artillery Barrage on the promotions strip, not three copies of the same picture in a row.- The strips close up again: across a row the trays slide an eighth of a tray under each other, so a row reads as one run of metal. The cameos never overlap each other, because every tray goes down before any picture does.- Watching, the top left corner is clear. The promotions and superweapon shelves that stood there are gone: every general's promotions are on the Tab scoreboard, and the band under each flag at the top says whether his superweapon can fire.-- Watching, an observer's board sits on the right of the screen, built from the command bar's own steel, and the steel is the watched side's: grey for America, red for China, sand for GLA, changing when you select a unit of another side: every player's general in the same metal tray the production strip uses, his name in his colour, the number in gold, and under it a bar filled the way the power bar is, green for one side and red for the other in a two-sided match and each player's own colour in a free for all. It opens on net worth, the cash in hand plus what everything the player has standing would cost to build again, counted twice a second, richest first.+- Watching, an observer's board sits on the right of the screen, built from the command bar's own steel, and the steel is the watched side's: grey for America, red for China, sand for GLA, changing when you select a unit of another side: every player's general, his name in his colour, the number in gold, and under it a bar in the same colour as his name. In a two-sided match the bars used to go green for one side and red for the other, so a blue name could stand over a red bar. It opens on net worth, the cash in hand plus what everything the player has standing would cost to build again, counted twice a second, richest first.- The number the board ranks by is yours to pick from the drop-down at its top: net worth, cash, income per minute, army value, kills and losses, the general's rank and power. The list re-sorts the moment you choose. The command bar's top row of keys picks them too while you watch, Q W E R T Y U, or Q E R T Y U I with the WASD camera, and the drop-down writes each stat's key beside it.-- A button under the list opens the armies: every player's six most expensive kinds of unit in cameo trays, with how many of each he has on the field. Each general's emblem sits square in its tray; it used to show a dark slit down one side.-- Across the top, watching, the same flags a player has: every general's flag under a stripe of his colour, a team hung in a plate of steel with its name, and the band for his superweapon, green once it can fire. Click a flag to watch that player; the one you watch has his flag framed in gold. The drop-downs on the right open over the board instead of pushing it down the screen.+- A button under the list opens the armies: every player's six most expensive kinds of unit in cameo trays, with how many of each he has on the field. The generals' emblems on the board stand bare, with no tray round them.+- Across the top, watching, the same flags a player has: every general's flag under a stripe of his colour, a team hung in a plate of steel with its name, and the band for his superweapon, green once it can fire. The flags are there to read, not to click; the player drop-down on the right is where you pick one. The drop-downs on the right open over the board instead of pushing it down the screen.- The superweapon countdowns and the promotions each general has bought moved into a panel on the left, one row per player with his general at the head of it, where they used to be two strips down the right-hand edge.- When a superweapon comes ready, the left side says so for eight seconds: whose it is, its picture and its name, "ready to fire". The newest is at the bottom, four at most.- Both are an ordinary web page with a stylesheet, in the game's Window folder. Change the colours, the sizes or the order there and the next match you watch draws it that way, and the page opens in a browser too.diff --git a/GeneralsMD/Code/Data/Window/Html/Spectator.html b/GeneralsMD/Code/Data/Window/Html/Spectator.htmlindex 5c9447f92..af1d36124 100644--- a/GeneralsMD/Code/Data/Window/Html/Spectator.html+++ b/GeneralsMD/Code/Data/Window/Html/Spectator.html@@ -26,16 +26,13 @@{{side}} "america", "china" or "gla": the side whose command bar is on screen{{stat}} the label of the picked stat{{statkey:stat}} the key that picks that stat: the command bar's top row, "Q" and so on- {{teams}} how many teams are leftdata-each="players", one copy per player still in the match, ranked by the picked stat, with- {{name}} {{value}} {{share}} (percent of the highest) {{networth}} {{color}} {{team}} {{teams}}+ {{name}} {{value}} {{share}} (percent of the highest) {{networth}} {{color}}{{portrait}} (a mapped image name, for <img src>)data-each="seats", ControlBar.html's list: one entry a team, {{kind}} "team" with {{label}},"solo" or "ffa", its players in places s0 to s7 with {{sN.image}} {{sN.color}} {{sN.weapon}},- {{sN.state}} "none" on an unused place, and here {{sN.click}} "watch:N" and {{sN.watched}}- "watched" while he is the one looked at; kind "gap" between two entries. A data-click of- watch:N looks at player N, what his button in the old player list did, and watch:N on the one- already looked at goes back to everybody+ {{sN.state}} "none" on an unused place; kind "gap" between two entries. Nothing on it is+ clicked: the camera's player drop-down is where a player is pickeddata-each="army", every player's run: a {{kind}} "head" entry carrying {{image}} (his general),{{color}} and {{name}}, then up to six "unit" entries, the most money first, with {{image}}{{count}}@@ -91,8 +88,7 @@/* each their general's flag filling a hairline frame with their colour along its top, and underit a band for their superweapons, green once one can fire, blue while none can yet, grey whenthey have none. A team hangs in a plate of the steel with its name under the flags; a free for- all is everybody side by side. A flag is the old player list's button: the pointer lights its- frame, and the player being watched has his in gold */+ all is everybody side by side */#seats { position: absolute; left: 180px; right: 180px; top: 0; text-align: center; }.steam, .sffa, .ssolo, .sgap { display: inline-block; position: relative; vertical-align: top; }.steam { padding: 0 2px 1px 2px; border: 1px solid #0c1114; border-top: 0; border-left-color: #b3bbc4;@@ -111,8 +107,6 @@.flag .lamp.ready { background-color: #4fd83a; }.flag .lamp.charging { background-color: #3a8ee8; }.flag .lamp.none { background-color: #6a737c; }- .flag:hover .frame, .flag:hover .lamp { border-color: #dfe5ea; }- .flag.watched .frame, .flag.watched .lamp { border-color: #e8d27a; }.sgap { width: 8px; height: 26px; }.row { padding: 2px 6px; color: #c9d2d9; }@@ -166,9 +160,11 @@.name { position: absolute; left: 34px; top: 1px; line-height: 10px; }.value { position: absolute; right: 3px; top: 1px; line-height: 10px; font-weight: bold; color: #e8d27a; }.meter { position: absolute; left: 34px; right: 3px; top: 12px; height: 3px; background-color: #030709; }+ /* the bar is the player's own colour, like his name; a two-sided match used to paint one side's+ bars green and the other's red, so a blue name stood over a red bar */.fill { height: 3px; }- .teams2.team0 .fill { background-image: url(PowerBarGreen); }- .teams2.team1 .fill { background-image: url(PowerBarRed); }+ /* the board's emblems stand bare, with no tray round them */+ .player .tray, .army .cell.head { background-image: none; }.button { height: 11px; line-height: 11px; margin: 3px 3px 0 3px; text-align: center; font-size: 8px; color: #c9d2d9; }.button.flipped { color: #b8f08a; }@@ -190,14 +186,14 @@<div id="seats"><div class="s{{kind}}" data-each="seats"><div class="flags">- <div class="flag {{s0.state}} {{s0.watched}}" data-click="{{s0.click}}"><div class="frame"><div class="stripe" style="background-color: {{s0.color}}"></div><img class="emblem" src="{{s0.image}}"></div><div class="lamp {{s0.weapon}}"></div></div>- <div class="flag {{s1.state}} {{s1.watched}}" data-click="{{s1.click}}"><div class="frame"><div class="stripe" style="background-color: {{s1.color}}"></div><img class="emblem" src="{{s1.image}}"></div><div class="lamp {{s1.weapon}}"></div></div>- <div class="flag {{s2.state}} {{s2.watched}}" data-click="{{s2.click}}"><div class="frame"><div class="stripe" style="background-color: {{s2.color}}"></div><img class="emblem" src="{{s2.image}}"></div><div class="lamp {{s2.weapon}}"></div></div>- <div class="flag {{s3.state}} {{s3.watched}}" data-click="{{s3.click}}"><div class="frame"><div class="stripe" style="background-color: {{s3.color}}"></div><img class="emblem" src="{{s3.image}}"></div><div class="lamp {{s3.weapon}}"></div></div>- <div class="flag {{s4.state}} {{s4.watched}}" data-click="{{s4.click}}"><div class="frame"><div class="stripe" style="background-color: {{s4.color}}"></div><img class="emblem" src="{{s4.image}}"></div><div class="lamp {{s4.weapon}}"></div></div>- <div class="flag {{s5.state}} {{s5.watched}}" data-click="{{s5.click}}"><div class="frame"><div class="stripe" style="background-color: {{s5.color}}"></div><img class="emblem" src="{{s5.image}}"></div><div class="lamp {{s5.weapon}}"></div></div>- <div class="flag {{s6.state}} {{s6.watched}}" data-click="{{s6.click}}"><div class="frame"><div class="stripe" style="background-color: {{s6.color}}"></div><img class="emblem" src="{{s6.image}}"></div><div class="lamp {{s6.weapon}}"></div></div>- <div class="flag {{s7.state}} {{s7.watched}}" data-click="{{s7.click}}"><div class="frame"><div class="stripe" style="background-color: {{s7.color}}"></div><img class="emblem" src="{{s7.image}}"></div><div class="lamp {{s7.weapon}}"></div></div>+ <div class="flag {{s0.state}}"><div class="frame"><div class="stripe" style="background-color: {{s0.color}}"></div><img class="emblem" src="{{s0.image}}"></div><div class="lamp {{s0.weapon}}"></div></div>+ <div class="flag {{s1.state}}"><div class="frame"><div class="stripe" style="background-color: {{s1.color}}"></div><img class="emblem" src="{{s1.image}}"></div><div class="lamp {{s1.weapon}}"></div></div>+ <div class="flag {{s2.state}}"><div class="frame"><div class="stripe" style="background-color: {{s2.color}}"></div><img class="emblem" src="{{s2.image}}"></div><div class="lamp {{s2.weapon}}"></div></div>+ <div class="flag {{s3.state}}"><div class="frame"><div class="stripe" style="background-color: {{s3.color}}"></div><img class="emblem" src="{{s3.image}}"></div><div class="lamp {{s3.weapon}}"></div></div>+ <div class="flag {{s4.state}}"><div class="frame"><div class="stripe" style="background-color: {{s4.color}}"></div><img class="emblem" src="{{s4.image}}"></div><div class="lamp {{s4.weapon}}"></div></div>+ <div class="flag {{s5.state}}"><div class="frame"><div class="stripe" style="background-color: {{s5.color}}"></div><img class="emblem" src="{{s5.image}}"></div><div class="lamp {{s5.weapon}}"></div></div>+ <div class="flag {{s6.state}}"><div class="frame"><div class="stripe" style="background-color: {{s6.color}}"></div><img class="emblem" src="{{s6.image}}"></div><div class="lamp {{s6.weapon}}"></div></div>+ <div class="flag {{s7.state}}"><div class="frame"><div class="stripe" style="background-color: {{s7.color}}"></div><img class="emblem" src="{{s7.image}}"></div><div class="lamp {{s7.weapon}}"></div></div></div><div class="teamname">{{label}}</div></div>@@ -263,7 +259,7 @@</div><div class="players">- <div class="player teams{{teams}} team{{team}}" data-each="players">+ <div class="player" data-each="players"><div class="tray"><img class="emblem" src="{{portrait}}"></div><span class="name" style="color: {{color}}">{{name}}</span><span class="value">{{value}}</span>diff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/ObserverCamera.h b/GeneralsMD/Code/GameEngine/Include/GameClient/ObserverCamera.hindex 3dda551c8..254323cb2 100644--- a/GeneralsMD/Code/GameEngine/Include/GameClient/ObserverCamera.h+++ b/GeneralsMD/Code/GameEngine/Include/GameClient/ObserverCamera.h@@ -25,8 +25,10 @@// counts only the fights that player is in. Player shows what the followed player's own screen// shows: a player's camera comes over the network a few times a second (MSG_SET_REPLAY_CAMERA), an// AI, which has no camera, gets the narrowed director, and with nobody picked it does nothing.-// Scrolling, turning the camera or clicking the radar hands it back to the watcher, who keeps the-// player he picked.+// Scrolling with the keys or a drag, turning the camera or clicking the radar hands it back to the+// watcher, who keeps the player he picked. The screen's edge does not scroll while this drives:+// the page's flags stand on the top edge and its panel on the right one, and reaching for either+// used to scroll the map and take the camera from the director with nobody asking.//// The followed player is picked from his own list, not the seats: clicking a unit makes its owner// the watched player, and the camera jumping to an enemy's screen on a click would be no use. Fog@@ -92,6 +94,8 @@ public:/// the player being followed, still while the watcher has the camera in his own hands, or/// NO_PLAYERInt getFollowedPlayerIndex( void ) const { return m_followed; }+ /// the camera is where this put it last frame, the director's or a player's+ Bool isDriving( void ) const { return m_driving; }Bool isFogOn( void ) const { return m_fog; }void setFog( Bool fog ) { m_fog = fog; }diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cppindex 6d3feedd0..929970e34 100644--- a/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp@@ -1788,7 +1788,6 @@ static Real elevatedReach( Real reach, Real range, const Coord3D ¢er, Real astatic const char *const SPECTATOR_PAGE = "Window\\Html\\Spectator.html";static const std::string FLIP_ACTION = "flip:";static const std::string PICK_ACTION = "pick:";-static const std::string WATCH_ACTION = "watch:";// data-click="camera:free", "camera:director" or "camera:player" picks who drives the camera// (ObserverCamera.h) and folds up flip:camera; "follow:N" or "follow:none" picks the player it// follows and folds up flip:follow; "fog" turns the followed player's fog on and off@@ -1944,14 +1943,14 @@ static void addObjectStats( Object *obj, void *userData )//-------------------------------------------------------------------------------------------------/** Everyone still in the match with his numbers, ranked by `stat`. Allies both ways share a team- * number, counted in the order the teams first appear in the player list; `teams` is how many. */+ * number, counted in the order the teams first appear in the player list. *///--------------------------------------------------------------------------------------------------static std::vector< SpectatorStats > gatherSpectatorStats( const SpectatorStat &stat, Int &teams )+static std::vector< SpectatorStats > gatherSpectatorStats( const SpectatorStat &stat ){std::vector< SpectatorStats > players;const Player *local = ThePlayerList->getLocalPlayer();const UnsignedInt frame = TheGameLogic->getFrame();- teams = 0;+ Int teams = 0;for( Int index = 0; index < ThePlayerList->getPlayerCount(); index++ ){Player *player = ThePlayerList->getNthPlayer( index );@@ -1991,11 +1990,9 @@ static std::vector< SpectatorStats > gatherSpectatorStats( const SpectatorStat &//-------------------------------------------------------------------------------------------------/** The page's "players" list: one entry per player in the order `players` is ranked, the picked- * number written out and as a percentage of the highest. Every entry carries how many teams- * there are, so a page can colour two sides the way Dota does and leave a free for all in the- * players' own colours. */+ * number written out and as a percentage of the highest. *///--------------------------------------------------------------------------------------------------static void fillSpectatorPlayers( const std::vector< SpectatorStats > &players, const SpectatorStat &stat, Int teams,+static void fillSpectatorPlayers( const std::vector< SpectatorStats > &players, const SpectatorStat &stat,std::vector< HtmlValues > &rows ){Int highest = 0;@@ -2024,8 +2021,6 @@ static void fillSpectatorPlayers( const std::vector< SpectatorStats > &players,row[ "networth" ] = std::to_string( stats.networth );row[ "share" ] = std::to_string( highest > 0 && value > 0 ? value * PERCENT / highest : 0 );row[ "color" ] = cssColor( clientPlayerColor( stats.player ) );- row[ "team" ] = std::to_string( stats.team );- row[ "teams" ] = std::to_string( teams );row[ "portrait" ] = portrait ? portrait->getName().str() : "";rows.push_back( row );}@@ -2277,8 +2272,6 @@ static void fillPlayerSeats( const std::vector< SpectatorStats > &seats, Int teagroup[ place + ".image" ] = head.at( "image" );group[ place + ".color" ] = head.at( "color" );group[ place + ".weapon" ] = ready ? "ready" : owned ? "charging" : "none";- group[ place + ".click" ] = WATCH_ACTION + std::to_string( seats[ end ].player->getPlayerIndex() );- group[ place + ".watched" ] = seats[ end ].player == TheControlBar->getObserverLookAtPlayer() ? "watched" : "";}group[ "kind" ] = freeForAll ? "ffa" : end - first > 1 ? "team" : "solo";for( size_t place = end - first; place < MAX_SLOTS; place++ )@@ -2384,16 +2377,15 @@ void InGameUI::drawSpectatorPage( void )if( m_spectatorOverlay == NULL )m_spectatorOverlay = new HtmlOverlay( m_superweaponNormalFont );- // a seat clicked or a unit selected moves the gold mark the same frame, not half a second on+ // a unit selected turns the page to his side's steel the same frame, not half a second onconst UnsignedInt frame = TheGameLogic->getFrame();const Player *watched = TheControlBar->getObserverLookAtPlayer();if( m_spectatorLists.empty() || watched != m_spectatorListsWatched|| frame < m_spectatorListsFrame || frame >= m_spectatorListsFrame + NET_WORTH_REFRESH_FRAMES ){const SpectatorStat &stat = spectatorStat( m_spectatorPicked );- Int teams = 0;- const std::vector< SpectatorStats > players = gatherSpectatorStats( stat, teams );- fillSpectatorPlayers( players, stat, teams, m_spectatorLists[ "players" ] );+ const std::vector< SpectatorStats > players = gatherSpectatorStats( stat );+ fillSpectatorPlayers( players, stat, m_spectatorLists[ "players" ] );fillSpectatorArmies( players, m_spectatorLists[ "army" ] );fillSpectatorFollows( players, m_spectatorLists[ "follows" ] );@@ -2405,7 +2397,6 @@ void InGameUI::drawSpectatorPage( void )m_spectatorTotals.clear();m_spectatorTotals[ "stat" ] = WideCharStringToMultiByte( TheGameText->fetch( stat.label ).str() );m_spectatorTotals[ PICK_ACTION + STAT_GROUP + ":" + stat.key ] = "on";- m_spectatorTotals[ "teams" ] = std::to_string( teams );m_spectatorTotals[ "side" ] = spectatorSide();for( Int each = 0; each < (Int)ARRAY_SIZE( SPECTATOR_STATS ); each++ )m_spectatorTotals[ std::string( "statkey:" ) + SPECTATOR_STATS[ each ].key ] = commandSlotKey( each * COMMAND_SLOTS_PER_COLUMN );@@ -2484,24 +2475,6 @@ void InGameUI::runSpectatorAction( const std::string &action )m_spectatorFlipped.erase( group );m_spectatorLists.clear();}- else if( action.compare( 0, WATCH_ACTION.size(), WATCH_ACTION ) == 0 )- {- // a seat across the top is that player's button in the old player list, and the seat already- // being watched is the list's cancel. A selection would keep the promotions and the skills on- // its own owner whatever the seat says, so the seat takes the whole screen and clears it- Player *player = ThePlayerList->getNthPlayer( atoi( action.c_str() + WATCH_ACTION.size() ) );- Player *watched = player == TheControlBar->getObserverLookAtPlayer() ? NULL : player;- deselectAllDrawables();- TheControlBar->watchPlayer( watched );-- // a replay with the recorded camera switched on in the options follows whoever is watched,- // what picking him in the old player list did- if( TheRecorder->getMode() == RECORDERMODETYPE_PLAYBACK && TheGlobalData->m_useCameraInReplay )- {- TheObserverCamera.followPlayer( watched != NULL ? watched->getPlayerIndex() : ObserverCamera::NO_PLAYER );- TheObserverCamera.setMode( watched != NULL ? OBSERVER_CAMERA_PLAYER : OBSERVER_CAMERA_FREE );- }- }else if( action.compare( 0, CAMERA_ACTION.size(), CAMERA_ACTION ) == 0 ){const std::string choice = action.substr( CAMERA_ACTION.size() );diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/LookAtXlat.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/LookAtXlat.cppindex d4c71fb5e..f067ad274 100644--- a/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/LookAtXlat.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/LookAtXlat.cpp@@ -48,6 +48,7 @@#include "GameClient/View.h"#include "GameClient/Drawable.h"#include "GameClient/LookAtXlat.h"+#include "GameClient/ObserverCamera.h"#include "GameLogic/Module/UpdateModule.h"#include "GameLogic/GameLogic.h"@@ -405,8 +406,10 @@ GameMessageDisposition LookAtTranslator::translateGameMessage(const GameMessage// the pointer has to be over the window: the position below is the last one the mouse// device was told about, and a pointer that has left a windowed game left through an// edge, so believing it would scroll the map for as long as the mouse sat on the desktop.+ // Nor while a watcher's director or player camera drives: the spectator page stands on the+ // top and right edges, and the pointer on its way to it took the camera away (ObserverCamera.h).const Bool edgeScrollAllowed = (!TheGlobalData->m_windowed || TheGlobalData->m_edgeScrollInWindowedMode)- && TheMouse->isCursorInWindow();+ && TheMouse->isCursorInWindow() && !TheObserverCamera.isDriving();if (m_isScrolling){