From d783595135ca768ae14f08aa4033dea35ed0458b Mon Sep 17 00:00:00 2001 From: oroborus Date: Sun, 10 Feb 2008 19:18:51 +0000 Subject: - dopisane objekty do prvej areny - opravy zvuku ( ak sa neinicalizuje, program sa sprava ako keby sa inicalizoval ) - opravy v sietovom multiplayeri - porgram ma parametre ( zatial nezdokumentovane, je to iba vidiet zo zdrojaka ) git-svn-id: http://opensvn.csie.org/tuxanci_ng@4 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e --- src/item.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'src/item.c') 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 : -- cgit v1.2.3