diff options
| author | jacksonmj <mj-pt@jacksonmj.co.uk> | 2013-09-08 17:14:12 (GMT) |
|---|---|---|
| committer | jacksonmj <mj-pt@jacksonmj.co.uk> | 2013-09-08 17:14:12 (GMT) |
| commit | 9eccad80b1c58f66cd1f23cefef922b55db5c39d (patch) | |
| tree | 947f2ccf37aee515fb7dfc01379ed34c43ad552f | |
| parent | 2e52e209a66335cece95e58f98141e1ba30a14aa (diff) | |
| download | powder-9eccad80b1c58f66cd1f23cefef922b55db5c39d.zip powder-9eccad80b1c58f66cd1f23cefef922b55db5c39d.tar.gz | |
Missing breaks in readOPS
Causing some elements to be loaded incorrectly
| -rw-r--r-- | src/client/GameSave.cpp | 4 | ||||
| -rw-r--r-- | src/simulation/Simulation.cpp | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/client/GameSave.cpp b/src/client/GameSave.cpp index df76c00..ddb4ef4 100644 --- a/src/client/GameSave.cpp +++ b/src/client/GameSave.cpp @@ -960,11 +960,13 @@ void GameSave::readOPS(char * data, int dataLength) case PT_PSTN: if (savedVersion < 87 && particles[newIndex].ctype) particles[newIndex].life = 1; + break; case PT_STKM: case PT_STKM2: case PT_FIGH: if (savedVersion < 88 && particles[newIndex].ctype == OLD_SPC_AIR) particles[newIndex].ctype = SPC_AIR; + break; case PT_FILT: if (savedVersion < 89) { @@ -972,6 +974,7 @@ void GameSave::readOPS(char * data, int dataLength) particles[newIndex].tmp = 6; particles[newIndex].ctype = 0; } + break; case PT_QRTZ: case PT_PQRT: if (savedVersion < 89) @@ -980,6 +983,7 @@ void GameSave::readOPS(char * data, int dataLength) particles[newIndex].tmp = particles[newIndex].ctype; particles[newIndex].ctype = 0; } + break; } //note: PSv was used in version 77.0 and every version before, add something in PSv too if the element is that old newIndex++; diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 92be515..b090841 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -2692,7 +2692,7 @@ int Simulation::create_part(int p, int x, int y, int tv) if (p==-2 && ((elements[type].Properties & PROP_DRAWONCTYPE) || type==PT_CRAY)) { parts[index].ctype = PT_SPRK; - return -1; + return index; } if (!(type == PT_INST || (elements[type].Properties&PROP_CONDUCTS)) || parts[index].life!=0) return -1; |
