Skip to content

Commit

Permalink
add RESTRICT_VERSION check to digitation stuff, update readme date
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob1 committed Mar 10, 2018
1 parent f2ac8a9 commit c861d69
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
@@ -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
Expand Down
9 changes: 9 additions & 0 deletions src/client/GameSave.cpp
Expand Up @@ -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)
Expand Down
4 changes: 1 addition & 3 deletions src/simulation/Simulation.cpp
Expand Up @@ -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)
Expand Down

0 comments on commit c861d69

Please sign in to comment.