1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-13 01:20:34 +02:00

Significant changes to saving system. Now both client and server store their lib part.

Desync detection upon loading. Fixed many desyncs. (more remain)
Monsters won't have creature count 0 even if that is set as creature properties.
This commit is contained in:
Michał W. Urbańczyk
2013-02-18 22:37:22 +00:00
parent 2e385375b7
commit d45a554fec
27 changed files with 502 additions and 231 deletions

View File

@ -172,7 +172,6 @@ public:
si32 subID; //normal subID (this one from OH3 maps ;])
ObjectInstanceID id;//number of object in map's vector
CGDefInfo * defInfo;
ui8 animPhaseShift;
TPlayerColor tempOwner;
bool blockVisit; //if non-zero then blocks the tile but is visitable from neighbouring tile
@ -211,7 +210,7 @@ public:
template <typename Handler> void serialize(Handler &h, const int version)
{
h & hoverName & pos & ID & subID & id & animPhaseShift & tempOwner & blockVisit & defInfo;
h & hoverName & pos & ID & subID & id & tempOwner & blockVisit & defInfo;
//definfo is handled by map serializer
}
protected:
@ -591,7 +590,7 @@ public:
std::vector<CGTownBuilding*> bonusingBuildings;
std::vector<SpellID> possibleSpells, obligatorySpells;
std::vector<std::vector<SpellID> > spells; //spells[level] -> vector of spells, first will be available in guild
std::list<CCastleEvent*> events;
std::list<CCastleEvent> events;
std::pair<si32, si32> bonusValue;//var to store town bonuses (rampart = resources from mystic pond);
//////////////////////////////////////////////////////////////////////////