Permalink
Browse files

change TSNS/HSWC/PSNS/PUMP .tmp to 0 in older saves

  • Loading branch information...
jacob1 committed Mar 18, 2018
1 parent 491d61a commit 126acb7db5651e1c9da179b94463ff1bb3d22843
Showing with 21 additions and 6 deletions.
  1. +21 −6 src/client/GameSave.cpp
@@ -1223,6 +1223,15 @@ void GameSave::readOPS(char * data, int dataLength)
particles[newIndex].ctype = particles[newIndex].tmp&0xFF;
}
break;
case PT_TSNS:
case PT_HSWC:
case PT_PSNS:
case PT_PUMP:
if (savedVersion < 93 && !fakeNewerVersion)
{
particles[newIndex].tmp = 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++;
@@ -1879,13 +1888,19 @@ void GameSave::readPSv(char * saveDataChar, int dataLength)
}
}
}
// Version 93.0
if (particles[i-1].type == PT_PIPE || particles[i-1].type == PT_PPIP)
if (ver < 93)
{
if (particles[i-1].ctype == 1)
particles[i-1].tmp |= 0x00020000; //PFLAG_INITIALIZING
particles[i-1].tmp |= (particles[i-1].ctype-1)<<18;
particles[i-1].ctype = particles[i-1].tmp&0xFF;
if (particles[i-1].type == PT_PIPE || particles[i-1].type == PT_PPIP)
{
if (particles[i-1].ctype == 1)
particles[i-1].tmp |= 0x00020000; //PFLAG_INITIALIZING
particles[i-1].tmp |= (particles[i-1].ctype-1)<<18;
particles[i-1].ctype = particles[i-1].tmp&0xFF;
}
else if (particles[i-1].type == PT_HSWC || particles[i-1].type == PT_PUMP)
{
particles[i-1].tmp = 0;
}
}
}
}

0 comments on commit 126acb7

Please sign in to comment.