summaryrefslogtreecommitdiff
path: root/src/save.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/save.c')
-rw-r--r--src/save.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/save.c b/src/save.c
index df98635..0e8c086 100644
--- a/src/save.c
+++ b/src/save.c
@@ -1141,7 +1141,7 @@ int parse_save_OPS(void *save, int size, int replace, int x0, int y0, unsigned c
}
if(partsData[i] >= PT_NUM)
partsData[i] = PT_DMND; //Replace all invalid elements with diamond
- if(pmap[y][x])
+ if(pmap[y][x] && posCount==0) // Check posCount to make sure an existing particle is not replaced twice if two particles are saved in that position
{
//Replace existing particle or allocated block
newIndex = pmap[y][x]>>8;
@@ -1284,6 +1284,10 @@ int parse_save_OPS(void *save, int size, int replace, int x0, int y0, unsigned c
STKM_init_legs(&(fighters[fcount]), newIndex);
}
}
+ else if (partsptr[newIndex].type == PT_SOAP)
+ {
+ partsptr[newIndex].ctype = 0;
+ }
if (!ptypes[partsptr[newIndex].type].enabled)
partsptr[newIndex].type = PT_NONE;
}