Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions Generals/Code/GameEngine/Source/GameClient/GUI/LoadScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1018,12 +1018,12 @@ GameSlot *lSlot = game->getSlot(game->getLocalSlotNum());
// Load the Player's m_playerWinLosses
winName.format( "GameSpyLoadScreen.wnd:WinRank%d",i);
m_playerRank[i] = TheWindowManager->winGetWindowFromId( m_loadScreen,TheNameKeyGenerator->nameToKey( winName ));
DEBUG_ASSERTCRASH(m_playerRank[i], ("Can't initialize the m_playerRank for the GameSpyLoadScreen loadscreen"));
// NOTE: m_playerRank[i] can be NULL if the GUI element is missing - we'll check before using it

// Load the Player's m_playerOfficerMedal
winName.format( "GameSpyLoadScreen.wnd:WinOfficer%d",i);
m_playerOfficerMedal[i] = TheWindowManager->winGetWindowFromId( m_loadScreen,TheNameKeyGenerator->nameToKey( winName ));
DEBUG_ASSERTCRASH(m_playerOfficerMedal[i], ("Can't initialize the m_playerOfficerMedal for the GameSpyLoadScreen loadscreen"));
// NOTE: m_playerOfficerMedal[i] can be NULL if the GUI element is missing - we'll check before using it

winName.format( "MultiplayerLoadScreen.wnd:StaticTextTeam%d",i);
teamWin[i] = TheWindowManager->winGetWindowFromId( m_loadScreen,TheNameKeyGenerator->nameToKey( winName ));
Expand Down Expand Up @@ -1051,8 +1051,10 @@ GameSlot *lSlot = game->getSlot(game->getLocalSlotNum());
if (!isPreorder)
preorderImg = NULL;
const Image *rankImg = LookupSmallRankImage(favSide, rankPoints);
m_playerOfficerMedal[i]->winSetEnabledImage(0, preorderImg);
m_playerRank[i]->winSetEnabledImage(0, rankImg);
if (m_playerOfficerMedal[i])
m_playerOfficerMedal[i]->winSetEnabledImage(0, preorderImg);
if (m_playerRank[i])
m_playerRank[i]->winSetEnabledImage(0, rankImg);

UnicodeString formatString;

Expand Down
10 changes: 6 additions & 4 deletions GeneralsMD/Code/GameEngine/Source/GameClient/GUI/LoadScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1654,12 +1654,12 @@ GameSlot *lSlot = game->getSlot(game->getLocalSlotNum());
// Load the Player's m_playerWinLosses
winName.format( "GameSpyLoadScreen.wnd:WinRank%d",i);
m_playerRank[i] = TheWindowManager->winGetWindowFromId( m_loadScreen,TheNameKeyGenerator->nameToKey( winName ));
DEBUG_ASSERTCRASH(m_playerRank[i], ("Can't initialize the m_playerRank for the GameSpyLoadScreen loadscreen"));
// NOTE: m_playerRank[i] can be NULL if the GUI element is missing - we'll check before using it

// Load the Player's m_playerOfficerMedal
winName.format( "GameSpyLoadScreen.wnd:WinOfficer%d",i);
m_playerOfficerMedal[i] = TheWindowManager->winGetWindowFromId( m_loadScreen,TheNameKeyGenerator->nameToKey( winName ));
DEBUG_ASSERTCRASH(m_playerOfficerMedal[i], ("Can't initialize the m_playerOfficerMedal for the GameSpyLoadScreen loadscreen"));
// NOTE: m_playerOfficerMedal[i] can be NULL if the GUI element is missing - we'll check before using it

winName.format( "MultiplayerLoadScreen.wnd:StaticTextTeam%d",i);
teamWin[i] = TheWindowManager->winGetWindowFromId( m_loadScreen,TheNameKeyGenerator->nameToKey( winName ));
Expand Down Expand Up @@ -1711,8 +1711,10 @@ GameSlot *lSlot = game->getSlot(game->getLocalSlotNum());
if (!isPreorder)
preorderImg = NULL;
const Image *rankImg = LookupSmallRankImage(favSide, rankPoints);
m_playerOfficerMedal[i]->winSetEnabledImage(0, preorderImg);
m_playerRank[i]->winSetEnabledImage(0, rankImg);
if (m_playerOfficerMedal[i])
m_playerOfficerMedal[i]->winSetEnabledImage(0, preorderImg);
if (m_playerRank[i])
m_playerRank[i]->winSetEnabledImage(0, rankImg);

UnicodeString formatString;

Expand Down
Loading