From: Holger Schemel Date: Sun, 18 Jul 2021 10:49:52 +0000 (+0200) Subject: fixed triggering CE actions by digging or collecting X-Git-Tag: 4.3.0.0~101 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=30c779b9e53dec1f45717ae749cc9280c3235e50;p=rocksndiamonds.git fixed triggering CE actions by digging or collecting The improvement for CE actions by digging or collecting elements not triggering before the dig or collect action was completely finished had a very nasty bug in that such CE events when triggered by snapping that element (which also counts as digging or collecting) just did not work. This bug is fixed by this change. This fixes commit ca2d6507. --- diff --git a/src/game.c b/src/game.c index 2535720a..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); }