From: Holger Schemel Date: Mon, 25 Jul 2022 17:22:01 +0000 (+0200) Subject: fixed bug when using different normal and deadly shield time X-Git-Tag: 4.3.3.0~80 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=892db4c42f305573f4ca35d93f34d295b7d239d6;p=rocksndiamonds.git fixed bug when using different normal and deadly shield time --- diff --git a/src/game.c b/src/game.c index 1cc2f72b..4b7533ad 100644 --- a/src/game.c +++ b/src/game.c @@ -14430,9 +14430,13 @@ static int DigField(struct PlayerInfo *player, } else if (element == EL_SHIELD_NORMAL || element == EL_SHIELD_DEADLY) { - player->shield_normal_time_left += level.shield_normal_time; + int shield_time = (element == EL_SHIELD_DEADLY ? + level.shield_deadly_time : + level.shield_normal_time); + + player->shield_normal_time_left += shield_time; if (element == EL_SHIELD_DEADLY) - player->shield_deadly_time_left += level.shield_deadly_time; + player->shield_deadly_time_left += shield_time; } else if (element == EL_DYNAMITE || element == EL_EM_DYNAMITE ||