diff options
| author | jacksonmj <jacksonmj@jacksonmj.none> | 2011-02-13 21:59:45 (GMT) |
|---|---|---|
| committer | FacialTurd <simon@hardwired.org.uk> | 2011-02-18 23:06:21 (GMT) |
| commit | 1b2330251395faef9f5b9f47094af205ed6acbbe (patch) | |
| tree | a1fd3ba546e0f7882f3a8d29b6a674084e28b218 /src | |
| parent | dab9f85024b8adcfdcec28c7651c20f5b344ac2e (diff) | |
| download | powder-1b2330251395faef9f5b9f47094af205ed6acbbe.zip powder-1b2330251395faef9f5b9f47094af205ed6acbbe.tar.gz | |
FLAG_STAGNANT usage lost during rewrite
Diffstat (limited to 'src')
| -rw-r--r-- | src/powder.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/powder.c b/src/powder.c index c302a82..77dc305 100644 --- a/src/powder.c +++ b/src/powder.c @@ -1780,6 +1780,9 @@ killed: } } + rt = parts[i].flags & FLAG_STAGNANT; + parts[i].flags &= ~FLAG_STAGNANT; + if ((t==PT_PHOT||t==PT_NEUT)) { if (t == PT_PHOT) { rt = pmap[fin_y][fin_x] & 0xFF; @@ -2008,24 +2011,25 @@ killed: break; } } - else if (clear_x!=x&&clear_y!=y && try_move(i, x, y, clear_x, clear_y)) { + else if ((clear_x!=x||clear_y!=y) && try_move(i, x, y, clear_x, clear_y)) { // if interpolation was done and haven't yet moved, try moving to last clear position parts[i].x = clear_xf; parts[i].y = clear_yf; } + else + parts[i].flags |= FLAG_STAGNANT; parts[i].vx *= ptypes[t].collision; parts[i].vy *= ptypes[t].collision; - if (!s) - parts[i].flags |= FLAG_STAGNANT; } else { - if (clear_x!=x&&clear_y!=y && try_move(i, x, y, clear_x, clear_y)) { + if ((clear_x!=x||clear_y!=y) && try_move(i, x, y, clear_x, clear_y)) { // if interpolation was done, try moving to last clear position parts[i].x = clear_xf; parts[i].y = clear_yf; } - parts[i].flags |= FLAG_STAGNANT; + else + parts[i].flags |= FLAG_STAGNANT; parts[i].vx *= ptypes[t].collision; parts[i].vy *= ptypes[t].collision; } |
