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
master
Per Inge Mathisen 2009-07-13 18:50:54 +00:00 committed by Git SVN Gateway
parent a70ba3f2e1
commit 72a10b7cc7
1 changed files with 30 additions and 0 deletions

View File

@ -2583,6 +2583,21 @@ BOOL loadGame(const char *pGameToLoad, BOOL keepObjects, BOOL freeMem, BOOL User
productionPlayer= selectedPlayer; productionPlayer= selectedPlayer;
bMultiPlayer = saveGameData.multiPlayer; bMultiPlayer = saveGameData.multiPlayer;
cmdDroidMultiExpBoost(true); 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) if(bMultiPlayer)
{ {
loadMultiStats(saveGameData.sPName,&playerStats); // stats stuff loadMultiStats(saveGameData.sPName,&playerStats); // stats stuff
@ -4693,6 +4708,21 @@ bool gameLoadV(PHYSFS_file* fileHandle, unsigned int version)
productionPlayer = selectedPlayer; productionPlayer = selectedPlayer;
game = saveGameData.sGame; game = saveGameData.sGame;
cmdDroidMultiExpBoost(true); 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) if(bMultiPlayer)
{ {
loadMultiStats(saveGameData.sPName,&playerStats); // stats stuff loadMultiStats(saveGameData.sPName,&playerStats); // stats stuff