From c861d69f9ccf3f37b9bf3a307ba1b6e629939dc4 Mon Sep 17 00:00:00 2001 From: jacob1 Date: Sat, 10 Mar 2018 17:03:44 -0500 Subject: [PATCH] add RESTRICT_VERSION check to digitation stuff, update readme date --- README.md | 2 +- src/client/GameSave.cpp | 9 +++++++++ src/simulation/Simulation.cpp | 4 +--- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 697924cc9e..cd65e2f741 100644 --- a/README.md +++ b/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 diff --git a/src/client/GameSave.cpp b/src/client/GameSave.cpp index c3b4e33949..f7513cb19a 100644 --- a/src/client/GameSave.cpp +++ b/src/client/GameSave.cpp @@ -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) diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 4e287c69d9..f721071eb6 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -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)