From 23c68b1db1e5ef8230826ca84e50c4e4a158f790 Mon Sep 17 00:00:00 2001
From: jacob1 <jfu614@gmail.com>
Date: Tue, 19 Dec 2017 22:15:32 -0500
Subject: [PATCH] fix issue loading manually created SOAP bubbles in some saves

---
 src/simulation/Simulation.cpp | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp
index 01369a23f..d45f59b92 100644
--- a/src/simulation/Simulation.cpp
+++ b/src/simulation/Simulation.cpp
@@ -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
 		}
 	}