diff options
Diffstat (limited to 'src/item.c')
| -rw-r--r-- | src/item.c | 20 |
1 files changed, 16 insertions, 4 deletions
@@ -273,6 +273,8 @@ void eventConflictShotWithItem(list_t *listItem, list_t *listShot) for( i = 0 ; i < listShot->count ; i++ ) { + bool_t isDelShot = FALSE; + thisShot = (shot_t *)listShot->list[i]; assert( thisShot != NULL ); @@ -298,12 +300,19 @@ void eventConflictShotWithItem(list_t *listItem, list_t *listShot) j--; } break; + case ITEM_EXPLOSION : case ITEM_BIG_EXPLOSION : - delListItem(listShot, i, destroyShot); + isDelShot = TRUE; break; } } + + if( isDelShot ) + { + delListItem(listShot, i, destroyShot); + i--; + } } } @@ -345,9 +354,12 @@ void eventGiveTuxItem(tux_t *tux, list_t *listItem) break; case ITEM_MINE : - delListItem(listItem, i, destroyItem); - addList(listItem, newItem(x, y, ITEM_EXPLOSION) ); - i--; + if( tux->bonus != BONUS_GHOST ) + { + delListItem(listItem, i, destroyItem); + addList(listItem, newItem(x, y, ITEM_EXPLOSION) ); + i--; + } break; case ITEM_EXPLOSION : |