Clear particle data in parse_save
Fixes QRTZ sometimes growing when copied and pasted
This commit is contained in:
parent
0232fc9301
commit
e18480006e
@ -657,6 +657,7 @@ int parse_save(void *save, int size, int replace, int x0, int y0, unsigned char
|
|||||||
if (pmap[y][x])
|
if (pmap[y][x])
|
||||||
{
|
{
|
||||||
k = pmap[y][x]>>8;
|
k = pmap[y][x]>>8;
|
||||||
|
memset(parts+k, 0, sizeof(particle));
|
||||||
parts[k].type = j;
|
parts[k].type = j;
|
||||||
if (j == PT_PHOT)
|
if (j == PT_PHOT)
|
||||||
parts[k].ctype = 0x3fffffff;
|
parts[k].ctype = 0x3fffffff;
|
||||||
@ -666,6 +667,7 @@ int parse_save(void *save, int size, int replace, int x0, int y0, unsigned char
|
|||||||
}
|
}
|
||||||
else if (i < nf)
|
else if (i < nf)
|
||||||
{
|
{
|
||||||
|
memset(parts+fp[i], 0, sizeof(particle));
|
||||||
parts[fp[i]].type = j;
|
parts[fp[i]].type = j;
|
||||||
if (j == PT_COAL)
|
if (j == PT_COAL)
|
||||||
parts[fp[i]].tmp = 50;
|
parts[fp[i]].tmp = 50;
|
||||||
|
Reference in New Issue
Block a user