Skip to content

Commit eb84ebf

Browse files
committed
Product info is now updated via the util functions.
1 parent 87193b6 commit eb84ebf

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

GeneralsMD/Code/GameEngine/Source/GameNetwork/LANAPI.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -926,6 +926,9 @@ void LANAPI::RequestGameCreate( UnicodeString gameName, Bool isDirectConnect )
926926
newSlot.setLogin(m_userName);
927927
newSlot.setHost(m_hostName);
928928

929+
// set product information for local game slot
930+
setProductInfoFromLocalData(&newSlot);
931+
929932
myGame->setSlot(0,newSlot);
930933
myGame->setNext(NULL);
931934
LANPreferences pref;

GeneralsMD/Code/GameEngine/Source/GameNetwork/LANAPIhandlers.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ void LANAPI::handleGameProductInfoResponse(LANMessage *msg, UnsignedInt senderIP
9999
return;
100100

101101
// a game host has acknowledged our request for product information
102-
game->getSlot(0)->setProductVersion(msg->ProductInfo.productVersion);
102+
setProductInfoFromMessage(msg, game->getSlot(0));
103103

104104
// update game list with colored names
105105
OnGameList(m_games);
@@ -153,7 +153,7 @@ void LANAPI::handleMatchProductInfoResponse(LANMessage *msg, UnsignedInt senderI
153153
continue;
154154

155155
// a fellow player in the game has acknowledged our request for product information
156-
m_currentGame->getSlot(i)->setProductVersion(msg->ProductInfo.productVersion);
156+
setProductInfoFromMessage(msg, m_currentGame->getSlot(i));
157157

158158
// update player list with colored names
159159
lanUpdateSlotList();
@@ -515,6 +515,10 @@ void LANAPI::handleJoinAccept( LANMessage *msg, UnsignedInt senderIP )
515515
slot.setLastHeard(0);
516516
slot.setLogin(m_userName);
517517
slot.setHost(m_hostName);
518+
519+
// set product information for local game slot
520+
setProductInfoFromLocalData(&slot);
521+
518522
m_currentGame->setSlot(pos, slot);
519523

520524
m_currentGame->getLANSlot(0)->setHost(msg->hostName);

0 commit comments

Comments
 (0)