restrict saves to version 94.0 when they use newer elements / features

This commit is contained in:
jacob1 2019-02-10 22:02:17 -05:00
parent edba703aab
commit 240bb3bd92

View File

@ -2032,7 +2032,7 @@ char * GameSave::serialiseOPS(unsigned int & dataLength)
ambientData[ambientDataLen++] = tempTemp;
ambientData[ambientDataLen++] = tempTemp >> 8;
if(blockMap[y][x]==WL_FAN)
if (blockMap[y][x] == WL_FAN)
{
i = (int)(fanVelX[y][x]*64.0f+127.5f);
if (i<0) i=0;
@ -2043,6 +2043,10 @@ char * GameSave::serialiseOPS(unsigned int & dataLength)
if (i>255) i=255;
fanData[fanDataLen++] = i;
}
else if (blockMap[y][x] == WL_STASIS)
{
RESTRICTVERSION(94, 0);
}
}
}
@ -2294,7 +2298,7 @@ char * GameSave::serialiseOPS(unsigned int & dataLength)
{
RESTRICTVERSION(92, 0);
}
/*else if (particles[i].type == PT_PIPE || particles[i].type == PT_PPIP)
else if (particles[i].type == PT_PIPE || particles[i].type == PT_PPIP)
{
RESTRICTVERSION(93, 0);
}
@ -2305,7 +2309,7 @@ char * GameSave::serialiseOPS(unsigned int & dataLength)
{
RESTRICTVERSION(93, 0);
}
}*/
}
if (PMAPBITS > 8)
{
if (TypeInCtype(particles[i].type, particles[i].ctype) && particles[i].ctype > 0xFF)
@ -2321,6 +2325,17 @@ char * GameSave::serialiseOPS(unsigned int & dataLength)
RESTRICTVERSION(93, 0);
}
}
if (particles[i].type == PT_LDTC)
{
RESTRICTVERSION(94, 0);
}
if (particles[i].type == PT_TSNS || particles[i].type == PT_PSNS)
{
if (particles[i].tmp == 2)
{
RESTRICTVERSION(94, 0);
}
}
//Get the pmap entry for the next particle in the same position
i = partsPosLink[i];