add RESTRICT_VERSION check to digitation stuff, update readme date

This commit is contained in:
jacob1 2018-03-10 17:03:44 -05:00
parent f2ac8a951c
commit c861d69f9c
3 changed files with 11 additions and 4 deletions

View File

@ -1,4 +1,4 @@
The Powder Toy - November 2017
The Powder Toy - March 2018
==========================
Get the latest version here: http://powdertoy.co.uk/Download.html

View File

@ -2246,6 +2246,15 @@ char * GameSave::serialiseOPS(unsigned int & dataLength)
RESTRICTVERSION(93, 0);
fromNewerVersion = true; // TODO: remove on 93.0 release
}
if (particles[i].type == PT_TSNS || particles[i].type == PT_PSNS
|| particles[i].type == PT_HSWC || particles[i].type == PT_PUMP)
{
if (particles[i].tmp == 1)
{
RESTRICTVERSION(93, 0);
fromNewerVersion = true; // TODO: remove on 93.0 release
}
}
if (PMAPBITS > 8)
{
if (Simulation::TypeInCtype(particles[i].type) && particles[i].ctype > 0xFF)

View File

@ -4113,12 +4113,10 @@ void Simulation::UpdateParticles(int start, int end)
kill_part(i);
goto killed;
}
if (part_change_type(i,x,y,t))
goto killed;
// part_change_type could refuse to change the type and kill the particle
// for example, changing type to STKM but one already exists
// we need to account for that to not cause simulation corruption issues
if (parts[i].type == PT_NONE)
if (part_change_type(i,x,y,t))
goto killed;
if (t==PT_FIRE || t==PT_PLSM || t==PT_CFLM)