mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-10 02:16:37 +02:00
fix BOMB explosion - wasn't creating circle EMBR, and too much velocity EMBR
This commit is contained in:
@@ -67,12 +67,11 @@ int Element_BOMB::update(UPDATE_FUNC_ARGS)
|
|||||||
for (nxi=-rad; nxi<=rad; nxi++)
|
for (nxi=-rad; nxi<=rad; nxi++)
|
||||||
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])
|
|
||||||
continue;
|
|
||||||
nt = pmap[y+nxj][x+nxi]&0xFF;
|
nt = pmap[y+nxj][x+nxi]&0xFF;
|
||||||
if (nt!=PT_DMND && nt!=PT_CLNE && nt!=PT_PCLN && nt!=PT_BCLN && nt!=PT_VIBR)
|
if (nt!=PT_DMND && nt!=PT_CLNE && nt!=PT_PCLN && nt!=PT_BCLN && nt!=PT_VIBR)
|
||||||
{
|
{
|
||||||
sim->kill_part(pmap[y+nxj][x+nxi]>>8);
|
if (nt)
|
||||||
|
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)
|
||||||
|
Reference in New Issue
Block a user