X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame.c;h=c3dc82cc2631d07c03bc56ce83bb4b3e9ddd6e8a;hb=963345fd2614535471086111e64eded2cd9818e4;hp=7e8f0baec9e01db75ca00cf6401edf0ac18ff8a5;hpb=3e66c6792cc10afd72877d14eb00d63c3932e872;p=rocksndiamonds.git diff --git a/src/game.c b/src/game.c index 7e8f0bae..c3dc82cc 100644 --- a/src/game.c +++ b/src/game.c @@ -13968,7 +13968,11 @@ static void TestFieldAfterSnapping(int x, int y, int element, int direction, if (level.finish_dig_collect) { int dig_side = MV_DIR_OPPOSITE(direction); + int change_event = (IS_DIGGABLE(element) ? CE_PLAYER_DIGS_X : + CE_PLAYER_COLLECTS_X); + CheckTriggeredElementChangeByPlayer(x, y, element, change_event, + player_index_bit, dig_side); CheckTriggeredElementChangeByPlayer(x, y, element, CE_PLAYER_SNAPS_X, player_index_bit, dig_side); } @@ -16186,19 +16190,6 @@ static void UnmapGameButtonsAtSamePosition_All(void) } } -static void MapGameButtonsAtSamePosition(int id) -{ - int i; - - for (i = 0; i < NUM_GAME_BUTTONS; i++) - if (i != id && - gamebutton_info[i].pos->x == gamebutton_info[id].pos->x && - gamebutton_info[i].pos->y == gamebutton_info[id].pos->y) - MapGadget(game_gadget[i]); - - UnmapGameButtonsAtSamePosition_All(); -} - void MapLoadSaveButtons(void) { UnmapGameButtonsAtSamePosition(GAME_CTRL_ID_LOAD);