BOMB: use kill_part instead of delete_part, fixes #432

this was the only element to use delete_part. Only brush drawing should ever use delete_part
This commit is contained in:
jacob1 2017-06-11 22:08:30 -04:00
parent d4a0ff9ac8
commit 5ac66bda75

View File

@ -68,7 +68,7 @@ int Element_BOMB::update(UPDATE_FUNC_ARGS)
if ((pow((float)nxi,2))/(pow((float)rad,2))+(pow((float)nxj,2))/(pow((float)rad,2))<=1)
if ((pmap[y+nxj][x+nxi]&0xFF)!=PT_DMND && (pmap[y+nxj][x+nxi]&0xFF)!=PT_CLNE && (pmap[y+nxj][x+nxi]&0xFF)!=PT_PCLN && (pmap[y+nxj][x+nxi]&0xFF)!=PT_BCLN && (pmap[y+nxj][x+nxi]&0xFF)!=PT_VIBR)
{
sim->delete_part(x+nxi, y+nxj);
sim->kill_part(pmap[y+nxj][x+nxi]>>8);
sim->pv[(y+nxj)/CELL][(x+nxi)/CELL] += 0.1f;
nb = sim->create_part(-3, x+nxi, y+nxj, PT_EMBR);
if (nb!=-1)