mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-16 03:40:16 +00:00
Fix for savegame incompatibility with master branch
This commit is contained in:
parent
41cce5240f
commit
24551c7bab
@ -99,6 +99,8 @@ void LocalMap::saveFogOfWar(MWWorld::CellStore* cell)
|
|||||||
{
|
{
|
||||||
const MapSegment& segment = mSegments[std::make_pair(cell->getCell()->getGridX(), cell->getCell()->getGridY())];
|
const MapSegment& segment = mSegments[std::make_pair(cell->getCell()->getGridX(), cell->getCell()->getGridY())];
|
||||||
|
|
||||||
|
if (segment.mFogOfWarImage && segment.mHasFogState)
|
||||||
|
{
|
||||||
std::auto_ptr<ESM::FogState> fog (new ESM::FogState());
|
std::auto_ptr<ESM::FogState> fog (new ESM::FogState());
|
||||||
fog->mFogTextures.push_back(ESM::FogTexture());
|
fog->mFogTextures.push_back(ESM::FogTexture());
|
||||||
|
|
||||||
@ -106,6 +108,7 @@ void LocalMap::saveFogOfWar(MWWorld::CellStore* cell)
|
|||||||
|
|
||||||
cell->setFog(fog.release());
|
cell->setFog(fog.release());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// FIXME: segmenting code duplicated from requestMap
|
// FIXME: segmenting code duplicated from requestMap
|
||||||
@ -133,6 +136,8 @@ void LocalMap::saveFogOfWar(MWWorld::CellStore* cell)
|
|||||||
|
|
||||||
fog->mFogTextures.push_back(ESM::FogTexture());
|
fog->mFogTextures.push_back(ESM::FogTexture());
|
||||||
|
|
||||||
|
// saving even if !segment.mHasFogState so we don't mess up the segmenting
|
||||||
|
// plus, older openmw versions can't deal with empty images
|
||||||
segment.saveFogOfWar(fog->mFogTextures.back());
|
segment.saveFogOfWar(fog->mFogTextures.back());
|
||||||
|
|
||||||
fog->mFogTextures.back().mX = x;
|
fog->mFogTextures.back().mX = x;
|
||||||
@ -644,7 +649,7 @@ void LocalMap::MapSegment::loadFogOfWar(const ESM::FogTexture &esm)
|
|||||||
|
|
||||||
void LocalMap::MapSegment::saveFogOfWar(ESM::FogTexture &fog) const
|
void LocalMap::MapSegment::saveFogOfWar(ESM::FogTexture &fog) const
|
||||||
{
|
{
|
||||||
if (!mFogOfWarImage || !mHasFogState)
|
if (!mFogOfWarImage)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
std::ostringstream ostream;
|
std::ostringstream ostream;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user