mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-26 22:57:00 +02:00
* fixed vector<bool> serialization
* fixed issue with loading castle event
This commit is contained in:
parent
937b316c11
commit
f8d7473f9a
@ -752,7 +752,7 @@ public:
|
|||||||
void saveBooleanVector(const std::vector<bool> & data)
|
void saveBooleanVector(const std::vector<bool> & data)
|
||||||
{
|
{
|
||||||
std::vector<ui8> convData;
|
std::vector<ui8> convData;
|
||||||
std::copy(data.begin(), data.end(), convData.begin());
|
std::copy(data.begin(), data.end(), std::back_inserter(convData));
|
||||||
saveSerializable(convData);
|
saveSerializable(convData);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -1133,7 +1133,7 @@ public:
|
|||||||
{
|
{
|
||||||
std::vector<ui8> convData;
|
std::vector<ui8> convData;
|
||||||
loadSerializable(convData);
|
loadSerializable(convData);
|
||||||
std::copy(convData.begin(), convData.end(), data.begin());
|
std::copy(convData.begin(), convData.end(), std::back_inserter(data));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2012,11 +2012,6 @@ CGTownInstance * CMapLoaderH3M::readTown(int castleID)
|
|||||||
|
|
||||||
readResourses(nce->resources);
|
readResourses(nce->resources);
|
||||||
|
|
||||||
for(int x = 0; x < 7; ++x)
|
|
||||||
{
|
|
||||||
nce->resources[x] = readUI32();
|
|
||||||
}
|
|
||||||
|
|
||||||
nce->players = readUI8();
|
nce->players = readUI8();
|
||||||
if(map->version > EMapFormat::AB)
|
if(map->version > EMapFormat::AB)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user