summaryrefslogtreecommitdiff
path: root/src/item.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/item.c')
-rw-r--r--src/item.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/item.c b/src/item.c
index 8167902..188ad5b 100644
--- a/src/item.c
+++ b/src/item.c
@@ -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 :