projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rnd-19990317-1-src
[rocksndiamonds.git]
/
src
/
game.c
diff --git
a/src/game.c
b/src/game.c
index 89ed530fcf9ba4d2cc551348dbe359bda6d7f121..d4860369384bee8c3a33cf2f685e70d89d1429c4 100644
(file)
--- a/
src/game.c
+++ b/
src/game.c
@@
-1114,13
+1114,22
@@
void Explode(int ex, int ey, int phase, int mode)
if (IS_MOVING(ex, ey) || IS_BLOCKED(ex, ey))
{
if (IS_MOVING(ex, ey) || IS_BLOCKED(ex, ey))
{
+ /* put moving element to center field (and let it explode there) */
center_element = MovingOrBlocked2Element(ex, ey);
RemoveMovingField(ex, ey);
center_element = MovingOrBlocked2Element(ex, ey);
RemoveMovingField(ex, ey);
+ Feld[ex][ey] = center_element;
}
}
- for (y=ey-1; y<
ey+2; y++) for(x=ex-1; x<ex+2
; x++)
+ for (y=ey-1; y<
=ey+1; y++) for(x=ex-1; x<=ex+1
; x++)
{
{
- int element = Feld[x][y];
+ int element;
+
+ if (!IN_LEV_FIELD(x, y) ||
+ ((mode != EX_NORMAL || center_element == EL_AMOEBA2DIAM) &&
+ (x != ex || y != ey)))
+ continue;
+
+ element = Feld[x][y];
if (IS_MOVING(x, y) || IS_BLOCKED(x, y))
{
if (IS_MOVING(x, y) || IS_BLOCKED(x, y))
{
@@
-1128,11
+1137,7
@@
void Explode(int ex, int ey, int phase, int mode)
RemoveMovingField(x, y);
}
RemoveMovingField(x, y);
}
- if (!IN_LEV_FIELD(x, y) || IS_MASSIVE(element) || element == EL_BURNING)
- continue;
-
- if ((mode != EX_NORMAL || center_element == EL_AMOEBA2DIAM) &&
- (x != ex || y != ey))
+ if (IS_MASSIVE(element) || element == EL_BURNING)
continue;
if (element == EL_EXPLODING)
continue;
if (element == EL_EXPLODING)