Missing breaks in readOPS

Causing some elements to be loaded incorrectly
This commit is contained in:
jacksonmj 2013-09-08 18:14:12 +01:00
parent 2e52e209a6
commit 9eccad80b1
2 changed files with 5 additions and 1 deletions

View File

@ -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++;

View File

@ -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;