+ return;
+ }
+ else if (IS_MAMPF3(Feld[newx][newy]))
+ {
+ if (DigField(newx,newy, 0,0, DF_DIG) == MF_MOVING)
+ DrawLevelField(newx,newy);
+ else
+ MovDir[x][y] = MV_NO_MOVING;
+ }
+ else if (!IS_FREE(newx,newy))
+ {
+ if (IS_PLAYER(x,y))
+ DrawPlayerField();
+ else
+ DrawLevelField(x,y);
+ return;
+ }
+ }
+ else if (element == EL_SCHWEIN && IN_LEV_FIELD(newx,newy))
+ {
+ if (IS_GEM(Feld[newx][newy]))
+ {
+ if (IS_MOVING(newx,newy))
+ RemoveMovingField(newx,newy);
+ else
+ {
+ Feld[newx][newy] = EL_LEERRAUM;
+ DrawLevelField(newx,newy);
+ }
+ }
+ else if (!IS_FREE(newx,newy))
+ {
+ if (IS_PLAYER(x,y))
+ DrawPlayerField();
+ else
+ DrawLevelField(x,y);
+ return;
+ }
+ }
+ else if (element==EL_DRACHE && IN_LEV_FIELD(newx,newy))
+ {
+ if (!IS_FREE(newx,newy))
+ {
+ if (IS_PLAYER(x,y))
+ DrawPlayerField();
+ else
+ DrawLevelField(x,y);
+ return;
+ }
+ else
+ {
+ BOOL wanna_flame = !RND(10);
+ int dx = newx - x, dy = newy - y;
+ int newx1 = newx+1*dx, newy1 = newy+1*dy;
+ int newx2 = newx+2*dx, newy2 = newy+2*dy;
+ int element1 = (IN_LEV_FIELD(newx1,newy1) ?
+ MovingOrBlocked2Element(newx1,newy1) : EL_BETON);
+ int element2 = (IN_LEV_FIELD(newx2,newy2) ?
+ MovingOrBlocked2Element(newx2,newy2) : EL_BETON);
+
+ if ((wanna_flame || IS_ENEMY(element1) || IS_ENEMY(element2)) &&
+ element1 != EL_DRACHE && element2 != EL_DRACHE &&
+ element1 != EL_BURNING && element2 != EL_BURNING)
+ {
+ if (IS_PLAYER(x,y))
+ DrawPlayerField();
+ else
+ DrawLevelField(x,y);
+
+ MovDelay[x][y] = 50;
+ Feld[newx][newy] = EL_BURNING;
+ if (IN_LEV_FIELD(newx1,newy1) && Feld[newx1][newy1] == EL_LEERRAUM)
+ Feld[newx1][newy1] = EL_BURNING;
+ if (IN_LEV_FIELD(newx2,newy2) && Feld[newx2][newy2] == EL_LEERRAUM)
+ Feld[newx2][newy2] = EL_BURNING;
+ return;
+ }
+ }
+ }
+ else if (element==EL_MAMPFER && IN_LEV_FIELD(newx,newy) &&
+ Feld[newx][newy]==EL_DIAMANT)
+ {
+ if (IS_MOVING(newx,newy))
+ RemoveMovingField(newx,newy);
+ else
+ {
+ Feld[newx][newy] = EL_LEERRAUM;
+ DrawLevelField(newx,newy);
+ }
+ }
+ else if (element==EL_MAMPFER2 && IN_LEV_FIELD(newx,newy) &&
+ IS_MAMPF2(Feld[newx][newy]))
+ {
+ if (AmoebaNr[newx][newy])
+ {
+ AmoebaCnt2[AmoebaNr[newx][newy]]--;
+ if (Feld[newx][newy]==EL_AMOEBE_VOLL || Feld[newx][newy]==EL_AMOEBE_BD)
+ AmoebaCnt[AmoebaNr[newx][newy]]--;
+ }
+
+ if (IS_MOVING(newx,newy))
+ RemoveMovingField(newx,newy);
+ else
+ {
+ Feld[newx][newy] = EL_LEERRAUM;
+ DrawLevelField(newx,newy);
+ }
+ }
+ else if (element==EL_PACMAN && IN_LEV_FIELD(newx,newy) &&
+ IS_AMOEBOID(Feld[newx][newy]))
+ {
+ if (AmoebaNr[newx][newy])
+ {
+ AmoebaCnt2[AmoebaNr[newx][newy]]--;
+ if (Feld[newx][newy]==EL_AMOEBE_VOLL || Feld[newx][newy]==EL_AMOEBE_BD)
+ AmoebaCnt[AmoebaNr[newx][newy]]--;
+ }
+
+ Feld[newx][newy] = EL_LEERRAUM;
+ DrawLevelField(newx,newy);
+ }
+ else if (!IN_LEV_FIELD(newx,newy) || !IS_FREE(newx,newy))
+ { /* gegen Wand gelaufen */
+ TurnRound(x,y);
+
+ if (element == EL_KAEFER || element == EL_FLIEGER)
+ DrawLevelField(x,y);
+ else if (element == EL_BUTTERFLY || element == EL_FIREFLY)
+ DrawGraphicAnimation(x,y, el2gfx(element), 2, 4, ANIM_NORMAL);
+ else if (element==EL_SONDE)
+ {
+ int nextJX = JX + (JX - lastJX);
+ int nextJY = JY + (JY - lastJY);
+
+ if (!(PlayerPushing && PlayerGfxPos && x == nextJX && y == nextJY))
+ DrawGraphicAnimation(x,y, GFX_SONDE_START, 8, 2, ANIM_NORMAL);
+ }
+
+ return;
+ }
+
+ if (element==EL_ROBOT && IN_SCR_FIELD(x,y))
+ PlaySoundLevel(x,y,SND_SCHLURF);
+
+ InitMovingField(x,y,MovDir[x][y]);
+ }
+
+ if (MovDir[x][y])
+ ContinueMoving(x,y);
+}
+
+void ContinueMoving(int x, int y)
+{
+ int element = Feld[x][y];
+ int direction = MovDir[x][y];
+ int dx = (direction==MV_LEFT ? -1 : direction==MV_RIGHT ? +1 : 0);
+ int dy = (direction==MV_UP ? -1 : direction==MV_DOWN ? +1 : 0);
+ int horiz_move = (dx!=0);
+ int newx = x + dx, newy = y + dy;
+ int step = (horiz_move ? dx : dy) * TILEX/8;