Skip to content

Commit

Permalink
fix issue loading manually created SOAP bubbles in some saves
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob1 committed Dec 20, 2017
1 parent 553eaf9 commit 23c68b1
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/simulation/Simulation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,22 +203,16 @@ int Simulation::Load(int fullX, int fullY, GameSave * save, bool includePressure
std::map<unsigned int, unsigned int>::iterator n = soapList.find(parts[i].tmp);
if (n != end)
parts[i].tmp = n->second;
else
{
parts[i].tmp = 0;
parts[i].ctype ^= 2;
}
// sometimes the proper SOAP isn't found. It should remove the link, but seems to break some saves
// so just ignore it
}
if ((parts[i].ctype & 0x4) == 4)
{
std::map<unsigned int, unsigned int>::iterator n = soapList.find(parts[i].tmp2);
if (n != end)
parts[i].tmp2 = n->second;
else
{
parts[i].tmp2 = 0;
parts[i].ctype ^= 4;
}
// sometimes the proper SOAP isn't found. It should remove the link, but seems to break some saves
// so just ignore it
}
}

Expand Down

0 comments on commit 23c68b1

Please sign in to comment.