From 72a10b7cc774aaa61a8a5ae1b43998debdf0e68b Mon Sep 17 00:00:00 2001 From: Per Inge Mathisen Date: Mon, 13 Jul 2009 18:50:54 +0000 Subject: [PATCH] Fix that closes ticket:633 Made research speed and power go haywire if we loaded a game. Patch by i-NoD. Quick fix. Will fix this properly with new savegame format later. git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7834 4a71c877-e1ca-e34f-864e-861f7616d084 --- src/game.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/game.c b/src/game.c index 16f1b16a4..3bbbdbe33 100644 --- a/src/game.c +++ b/src/game.c @@ -2583,6 +2583,21 @@ BOOL loadGame(const char *pGameToLoad, BOOL keepObjects, BOOL freeMem, BOOL User productionPlayer= selectedPlayer; bMultiPlayer = saveGameData.multiPlayer; cmdDroidMultiExpBoost(true); + + NetPlay.bComms = (saveGameData.sNetPlay).bComms; + for (i = 0; i < MAX_PLAYERS; i++) + { + strcpy((NetPlay.players[i]).name, ((saveGameData.sNetPlay).players[i]).name); + if ((saveGameData.sGame).skDiff[i] == UBYTE_MAX) + { + (NetPlay.players[i]).allocated = true; + } + else + { + (NetPlay.players[i]).allocated = false; + } + } + if(bMultiPlayer) { loadMultiStats(saveGameData.sPName,&playerStats); // stats stuff @@ -4693,6 +4708,21 @@ bool gameLoadV(PHYSFS_file* fileHandle, unsigned int version) productionPlayer = selectedPlayer; game = saveGameData.sGame; cmdDroidMultiExpBoost(true); + + NetPlay.bComms = (saveGameData.sNetPlay).bComms; + for (i = 0; i < MAX_PLAYERS; i++) + { + strcpy((NetPlay.players[i]).name, ((saveGameData.sNetPlay).players[i]).name); + if ((saveGameData.sGame).skDiff[i] == UBYTE_MAX) + { + (NetPlay.players[i]).allocated = true; + } + else + { + (NetPlay.players[i]).allocated = false; + } + } + if(bMultiPlayer) { loadMultiStats(saveGameData.sPName,&playerStats); // stats stuff