Allow stickman head to go through everything
This commit is contained in:
parent
31a61d0888
commit
95ca29cc64
26
src/powder.c
26
src/powder.c
@ -2481,7 +2481,31 @@ killed:
|
|||||||
stagnant = parts[i].flags & FLAG_STAGNANT;
|
stagnant = parts[i].flags & FLAG_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<CELL || nx>=XRES-CELL || ny<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 (t == PT_PHOT) {
|
||||||
if (parts[i].flags&FLAG_SKIPMOVE)
|
if (parts[i].flags&FLAG_SKIPMOVE)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user