diff --git a/src/powder.c b/src/powder.c index d55c9bd5d..f6f1e8c2a 100644 --- a/src/powder.c +++ b/src/powder.c @@ -2481,7 +2481,31 @@ killed: stagnant = parts[i].flags & FLAG_STAGNANT; parts[i].flags &= ~FLAG_STAGNANT; - if (ptypes[t].properties & TYPE_ENERGY) { + if (t==PT_STKM || t==PT_STKM2 || t==PT_FIGH) + { + int nx, ny; + //head movement, let head pass through anything + parts[i].x += parts[i].vx; + parts[i].y += parts[i].vy; + nx = (int)((float)parts[i].x+0.5f); + ny = (int)((float)parts[i].y+0.5f); + if (ny!=y || nx!=x) + { + if ((pmap[y][x]>>8)==i) pmap[y][x] = 0; + else if ((photons[y][x]>>8)==i) photons[y][x] = 0; + if (nx=XRES-CELL || ny=YRES-CELL) + { + kill_part(i); + continue; + } + if (ptypes[t].properties & TYPE_ENERGY) + photons[ny][nx] = t|(i<<8); + else if (t) + pmap[ny][nx] = t|(i<<8); + } + } + else if (ptypes[t].properties & TYPE_ENERGY) + { if (t == PT_PHOT) { if (parts[i].flags&FLAG_SKIPMOVE) {