mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-26 09:24:28 +02:00
FLAG_STAGNANT usage lost during rewrite
This commit is contained in:
12
src/powder.c
12
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||t==PT_NEUT)) {
|
||||||
if (t == PT_PHOT) {
|
if (t == PT_PHOT) {
|
||||||
rt = pmap[fin_y][fin_x] & 0xFF;
|
rt = pmap[fin_y][fin_x] & 0xFF;
|
||||||
@@ -2008,23 +2011,24 @@ killed:
|
|||||||
break;
|
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
|
// if interpolation was done and haven't yet moved, try moving to last clear position
|
||||||
parts[i].x = clear_xf;
|
parts[i].x = clear_xf;
|
||||||
parts[i].y = clear_yf;
|
parts[i].y = clear_yf;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
parts[i].flags |= FLAG_STAGNANT;
|
||||||
parts[i].vx *= ptypes[t].collision;
|
parts[i].vx *= ptypes[t].collision;
|
||||||
parts[i].vy *= ptypes[t].collision;
|
parts[i].vy *= ptypes[t].collision;
|
||||||
if (!s)
|
|
||||||
parts[i].flags |= FLAG_STAGNANT;
|
|
||||||
}
|
}
|
||||||
else
|
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
|
// if interpolation was done, try moving to last clear position
|
||||||
parts[i].x = clear_xf;
|
parts[i].x = clear_xf;
|
||||||
parts[i].y = clear_yf;
|
parts[i].y = clear_yf;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
parts[i].flags |= FLAG_STAGNANT;
|
parts[i].flags |= FLAG_STAGNANT;
|
||||||
parts[i].vx *= ptypes[t].collision;
|
parts[i].vx *= ptypes[t].collision;
|
||||||
parts[i].vy *= ptypes[t].collision;
|
parts[i].vy *= ptypes[t].collision;
|
||||||
|
Reference in New Issue
Block a user