Permalink
Browse files

fix BOMB explosion - wasn't creating circle EMBR, and too much veloci…

…ty EMBR
  • Loading branch information...
jacob1 committed Jul 30, 2017
1 parent 8fe3ca0 commit c4e1f4961896fad831a382d618d526d1e2dd39f9
Showing with 2 additions and 3 deletions.
  1. +2 −3 src/simulation/elements/BOMB.cpp
@@ -67,12 +67,11 @@ int Element_BOMB::update(UPDATE_FUNC_ARGS)
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 (!pmap[y+nxj][x+nxi])
continue;
nt = pmap[y+nxj][x+nxi]&0xFF;
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;
nb = sim->create_part(-3, x+nxi, y+nxj, PT_EMBR);
if (nb!=-1)

0 comments on commit c4e1f49

Please sign in to comment.