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:
parent
d4a0ff9ac8
commit
5ac66bda75
@ -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 ((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)
|
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;
|
sim->pv[(y+nxj)/CELL][(x+nxi)/CELL] += 0.1f;
|
||||||
nb = sim->create_part(-3, x+nxi, y+nxj, PT_EMBR);
|
nb = sim->create_part(-3, x+nxi, y+nxj, PT_EMBR);
|
||||||
if (nb!=-1)
|
if (nb!=-1)
|
||||||
|
Loading…
Reference in New Issue
Block a user