X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame.c;h=82aa0240f6011653f4032bc378cc66c92b4cce40;hb=4ce4ca0889817ddafeaebb710f8f19bfdbf7d2ea;hp=1bea27fe4f59876bdfbc5aece1eff07dffbf4bdd;hpb=f857fec3082c785b0dd271b6ad1b7642a2ed4e65;p=rocksndiamonds.git diff --git a/src/game.c b/src/game.c index 1bea27fe..82aa0240 100644 --- a/src/game.c +++ b/src/game.c @@ -6446,7 +6446,39 @@ int DigField(struct PlayerInfo *player, break; default: - if (IS_PUSHABLE(element)) + if (IS_WALKABLE(element)) + { + break; + } + else if (IS_DIGGABLE(element)) + { + RemoveField(x, y); +#if 1 + if (mode != DF_SNAP) + { + GfxElement[x][y] = element; + player->is_digging = TRUE; + } +#endif + PlaySoundLevelElementAction(x, y, element, ACTION_DIGGING); + + break; + } + else if (IS_COLLECTIBLE(element)) + { + RemoveField(x, y); +#if 1 + if (mode != DF_SNAP) + { + GfxElement[x][y] = element; + player->is_collecting = TRUE; + } +#endif + PlaySoundLevelElementAction(x, y, element, ACTION_COLLECTING); + + break; + } + else if (IS_PUSHABLE(element)) { if (mode == DF_SNAP) return MF_NO_ACTION;