From c4e1f4961896fad831a382d618d526d1e2dd39f9 Mon Sep 17 00:00:00 2001 From: jacob1 Date: Sat, 29 Jul 2017 22:47:07 -0400 Subject: [PATCH] fix BOMB explosion - wasn't creating circle EMBR, and too much velocity EMBR --- src/simulation/elements/BOMB.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/simulation/elements/BOMB.cpp b/src/simulation/elements/BOMB.cpp index bcde4a1d4..79e8f496a 100644 --- a/src/simulation/elements/BOMB.cpp +++ b/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)