mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-13 19:54:17 +02:00
Merge branch 'PlayerStateFix' into develop
This is additional fix for old saves that were corrupt after PR #202 is fixed. Should probably make them all work properly. Background: many years ago CBonusSystemNode didn't have proper serialization or at least PlayerState had some nissues with it. Then bonus system was refactored many times, but that hack was forgotten or everyone just decide to not touch it. Now it's end up this code wasn't needed probably for long time so we can finally remove it.
This commit is contained in:
@@ -43,7 +43,14 @@ public:
|
|||||||
{
|
{
|
||||||
h & color & human & team & resources & status;
|
h & color & human & team & resources & status;
|
||||||
h & heroes & towns & availableHeroes & dwellings & quests & visitedObjects;
|
h & heroes & towns & availableHeroes & dwellings & quests & visitedObjects;
|
||||||
h & getBonusList(); //FIXME FIXME FIXME
|
|
||||||
|
if(version < 760)
|
||||||
|
{
|
||||||
|
//was: h & getBonusList();
|
||||||
|
BonusList junk;
|
||||||
|
h & junk;
|
||||||
|
}
|
||||||
|
|
||||||
h & status & daysWithoutCastle;
|
h & status & daysWithoutCastle;
|
||||||
h & enteredLosingCheatCode & enteredWinningCheatCode;
|
h & enteredLosingCheatCode & enteredWinningCheatCode;
|
||||||
h & static_cast<CBonusSystemNode&>(*this);
|
h & static_cast<CBonusSystemNode&>(*this);
|
||||||
|
@@ -27,7 +27,7 @@
|
|||||||
#include "mapping/CCampaignHandler.h" //for CCampaignState
|
#include "mapping/CCampaignHandler.h" //for CCampaignState
|
||||||
#include "rmg/CMapGenerator.h" // for CMapGenOptions
|
#include "rmg/CMapGenerator.h" // for CMapGenOptions
|
||||||
|
|
||||||
const ui32 version = 759;
|
const ui32 version = 760;
|
||||||
const ui32 minSupportedVersion = 753;
|
const ui32 minSupportedVersion = 753;
|
||||||
|
|
||||||
class CISer;
|
class CISer;
|
||||||
|
@@ -162,6 +162,7 @@
|
|||||||
<Unit filename="CObstacleInstance.h" />
|
<Unit filename="CObstacleInstance.h" />
|
||||||
<Unit filename="CPathfinder.cpp" />
|
<Unit filename="CPathfinder.cpp" />
|
||||||
<Unit filename="CPathfinder.h" />
|
<Unit filename="CPathfinder.h" />
|
||||||
|
<Unit filename="CPlayerState.h" />
|
||||||
<Unit filename="CRandomGenerator.cpp" />
|
<Unit filename="CRandomGenerator.cpp" />
|
||||||
<Unit filename="CRandomGenerator.h" />
|
<Unit filename="CRandomGenerator.h" />
|
||||||
<Unit filename="CScriptingModule.h" />
|
<Unit filename="CScriptingModule.h" />
|
||||||
|
Reference in New Issue
Block a user