summaryrefslogtreecommitdiff
path: root/src/simulation/SaveLoader.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-05-12 12:21:04 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-05-12 12:21:04 (GMT)
commit16d3895e9c054e908ca8b230719f4294e824a4a2 (patch)
tree8246b0ebc3b94ed05427b8ffa5ea1e1764c7a37a /src/simulation/SaveLoader.cpp
parent1c993435efc7fe6702d21c892e1d4dd8347d2e7f (diff)
downloadpowder-16d3895e9c054e908ca8b230719f4294e824a4a2.zip
powder-16d3895e9c054e908ca8b230719f4294e824a4a2.tar.gz
Redo Wall IDs
Diffstat (limited to 'src/simulation/SaveLoader.cpp')
-rw-r--r--src/simulation/SaveLoader.cpp35
1 files changed, 34 insertions, 1 deletions
diff --git a/src/simulation/SaveLoader.cpp b/src/simulation/SaveLoader.cpp
index 7989d38..9bfb131 100644
--- a/src/simulation/SaveLoader.cpp
+++ b/src/simulation/SaveLoader.cpp
@@ -194,7 +194,7 @@ int SaveLoader::PSVLoad(unsigned char * data, int dataLength, Simulation * sim,
{
//In old saves, ignore walls created by sign tool bug
//Not ignoring other invalid walls or invalid walls in new saves, so that any other bugs causing them are easier to notice, find and fix
- if (ver<71 && d[p]==WL_SIGN)
+ if (ver<71 && d[p]==O_WL_SIGN)
{
p++;
continue;
@@ -227,6 +227,39 @@ int SaveLoader::PSVLoad(unsigned char * data, int dataLength, Simulation * sim,
sim->bmap[y][x]=WL_EHOLE;
if (sim->bmap[y][x]==13)
sim->bmap[y][x]=WL_ALLOWGAS;
+
+ if (sim->bmap[y][x]==O_WL_WALLELEC)
+ sim->bmap[y][x]=WL_WALLELEC;
+ if (sim->bmap[y][x]==O_WL_EWALL)
+ sim->bmap[y][x]=WL_EWALL;
+ if (sim->bmap[y][x]==O_WL_DETECT)
+ sim->bmap[y][x]=WL_DETECT;
+ if (sim->bmap[y][x]==O_WL_STREAM)
+ sim->bmap[y][x]=WL_STREAM;
+ if (sim->bmap[y][x]==O_WL_FAN||sim->bmap[y][x]==O_WL_FANHELPER)
+ sim->bmap[y][x]=WL_FAN;
+ if (sim->bmap[y][x]==O_WL_ALLOWLIQUID)
+ sim->bmap[y][x]=WL_ALLOWLIQUID;
+ if (sim->bmap[y][x]==O_WL_DESTROYALL)
+ sim->bmap[y][x]=WL_DESTROYALL;
+ if (sim->bmap[y][x]==O_WL_ERASE)
+ sim->bmap[y][x]=WL_ERASE;
+ if (sim->bmap[y][x]==O_WL_WALL)
+ sim->bmap[y][x]=WL_WALL;
+ if (sim->bmap[y][x]==O_WL_ALLOWAIR)
+ sim->bmap[y][x]=WL_ALLOWAIR;
+ if (sim->bmap[y][x]==O_WL_ALLOWSOLID)
+ sim->bmap[y][x]=WL_ALLOWSOLID;
+ if (sim->bmap[y][x]==O_WL_ALLOWALLELEC)
+ sim->bmap[y][x]=WL_ALLOWALLELEC;
+ if (sim->bmap[y][x]==O_WL_EHOLE)
+ sim->bmap[y][x]=WL_EHOLE;
+ if (sim->bmap[y][x]==O_WL_ALLOWGAS)
+ sim->bmap[y][x]=WL_ALLOWGAS;
+ if (sim->bmap[y][x]==O_WL_GRAV)
+ sim->bmap[y][x]=WL_GRAV;
+ if (sim->bmap[y][x]==O_WL_ALLOWENERGY)
+ sim->bmap[y][x]=WL_ALLOWENERGY;
}
p++;