diff options
| author | jacksonmj <mj-pt@jacksonmj.co.uk> | 2011-08-20 19:41:39 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2011-08-22 00:02:02 (GMT) |
| commit | 75cb924bd9d0525646bbdabf8959b58e149b7442 (patch) | |
| tree | bd6c6cd9bf74c72b176f5a2915a95bb5ed36300a /src/elements | |
| parent | 27a95c7684de3cb568e27193eec7fdffd2a7f23b (diff) | |
| download | powder-75cb924bd9d0525646bbdabf8959b58e149b7442.zip powder-75cb924bd9d0525646bbdabf8959b58e149b7442.tar.gz | |
Fix electrode when in replace mode or specific delete mode
Also fix bomb when SLALT != 0
Diffstat (limited to 'src/elements')
| -rw-r--r-- | src/elements/bomb.c | 2 | ||||
| -rw-r--r-- | src/elements/sprk.c | 4 | ||||
| -rw-r--r-- | src/elements/stkm.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/elements/bomb.c b/src/elements/bomb.c index 8115a88..de10fcc 100644 --- a/src/elements/bomb.c +++ b/src/elements/bomb.c @@ -44,7 +44,7 @@ int update_BOMB(UPDATE_FUNC_ARGS) { for (nxi=-rad; nxi<=rad; nxi++) if ((pow(nxi,2))/(pow(rad,2))+(pow(nxj,2))/(pow(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) { - delete_part(x+nxi, y+nxj);//it SHOULD kill anything but the exceptions above, doesn't seem to always work + delete_part(x+nxi, y+nxj, 0);//it SHOULD kill anything but the exceptions above, doesn't seem to always work pv[(y+nxj)/CELL][(x+nxi)/CELL] += 0.1f; nb = create_part(-1, x+nxi, y+nxj, PT_BOMB); if (nb!=-1) { diff --git a/src/elements/sprk.c b/src/elements/sprk.c index 039453f..0f3d8e9 100644 --- a/src/elements/sprk.c +++ b/src/elements/sprk.c @@ -35,7 +35,7 @@ int update_SPRK(UPDATE_FUNC_ARGS) { nearp = nearest_part(i, PT_ETRD); if (nearp!=-1&&parts_avg(i, nearp, PT_INSL)!=PT_INSL) { - create_line(x, y, (int)(parts[nearp].x+0.5f), (int)(parts[nearp].y+0.5f), 0, 0, PT_PLSM); + create_line(x, y, (int)(parts[nearp].x+0.5f), (int)(parts[nearp].y+0.5f), 0, 0, PT_PLSM, 0); part_change_type(i,x,y,ct); ct = parts[i].ctype = PT_NONE; parts[i].life = 20; @@ -152,7 +152,7 @@ int update_SPRK(UPDATE_FUNC_ARGS) { else if (rt==PT_INST) { if (parts[i].life>=3&&parts[r>>8].life==0) { - flood_parts(x+rx,y+ry,PT_SPRK,PT_INST,-1);//spark the wire + flood_parts(x+rx,y+ry,PT_SPRK,PT_INST,-1, 0);//spark the wire } } else if (parts[r>>8].life==0 && (parts[i].life<3 || ((r>>8)<i && parts[i].life<4))) { diff --git a/src/elements/stkm.c b/src/elements/stkm.c index 4b43f57..c574fb5 100644 --- a/src/elements/stkm.c +++ b/src/elements/stkm.c @@ -240,7 +240,7 @@ int run_stickman(float* playerp, UPDATE_FUNC_ARGS) { { int np = -1; if (playerp[2] == SPC_AIR) - create_parts(rx + 3*((((int)playerp[1])&0x02) == 0x02) - 3*((((int)playerp[1])&0x01) == 0x01), ry, 4, 4, SPC_AIR); + create_parts(rx + 3*((((int)playerp[1])&0x02) == 0x02) - 3*((((int)playerp[1])&0x01) == 0x01), ry, 4, 4, SPC_AIR, 0); else np = create_part(-1, rx, ry, playerp[2]); if ( (np < NPART) && np>=0 && playerp[2] != PT_PHOT && playerp[2] != SPC_AIR) |
