Skip to content

Commit d6a268d

Browse files
committed
addendum c41748d
fix creg
1 parent e593776 commit d6a268d

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

rts/Game/Game.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
class JobDispatcher;
1616
class CConsoleHistory;
17-
class CInfoConsole;
1817
class LuaParser;
1918
class ILoadSaveHandler;
2019
class Action;
@@ -214,7 +213,6 @@ class CGame : public CGameController
214213
*/
215214
int speedControl;
216215

217-
CInfoConsole* infoConsole;
218216
CConsoleHistory* consoleHistory;
219217

220218
private:

rts/Game/UnsyncedGameCommands.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,12 +1047,12 @@ class LastMessagePositionActionExecutor : public IUnsyncedActionExecutor {
10471047
"Moves the camera to show the position of the last message") {}
10481048

10491049
bool Execute(const UnsyncedAction& action) const {
1050-
if (game->infoConsole->GetMsgPosCount() == 0)
1050+
if (infoConsole->GetMsgPosCount() == 0)
10511051
return false;
10521052

10531053
// cycle through the positions
10541054
camHandler->CameraTransition(0.6f);
1055-
camHandler->GetCurrentController().SetPos(game->infoConsole->GetMsgPos());
1055+
camHandler->GetCurrentController().SetPos(infoConsole->GetMsgPos());
10561056
return true;
10571057
}
10581058
};
@@ -2169,10 +2169,10 @@ class ConsoleActionExecutor : public IUnsyncedActionExecutor {
21692169
"Enables/Disables the in-game console") {}
21702170

21712171
bool Execute(const UnsyncedAction& action) const {
2172-
if (!game->infoConsole)
2172+
if (infoConsole == nullptr)
21732173
return false;
21742174

2175-
InverseOrSetBool(game->infoConsole->enabled, action.GetArgs());
2175+
InverseOrSetBool(infoConsole->enabled, action.GetArgs());
21762176
return true;
21772177
}
21782178
};

rts/Lua/LuaUnsyncedRead.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1917,7 +1917,7 @@ int LuaUnsyncedRead::GetClipboard(lua_State* L)
19171917

19181918
int LuaUnsyncedRead::GetLastMessagePositions(lua_State* L)
19191919
{
1920-
CInfoConsole* ic = game->infoConsole;
1920+
CInfoConsole* ic = infoConsole;
19211921

19221922
if (ic == NULL)
19231923
return 0;
@@ -1939,7 +1939,7 @@ int LuaUnsyncedRead::GetLastMessagePositions(lua_State* L)
19391939

19401940
int LuaUnsyncedRead::GetConsoleBuffer(lua_State* L)
19411941
{
1942-
CInfoConsole* ic = game->infoConsole;
1942+
CInfoConsole* ic = infoConsole;
19431943
if (ic == NULL) {
19441944
return true;
19451945
}

0 commit comments

Comments
 (0)