diff options
| author | oroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-05-30 17:03:33 +0000 |
|---|---|---|
| committer | oroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-05-30 17:03:33 +0000 |
| commit | 6f8cef248e1467595a932707eb9a9c53af2e8839 (patch) | |
| tree | 14beaef0e6253ab3657b59a90231d2788806307a /src/item.c | |
| parent | 13cb3930e9989aba57f0301a821f64ceed29af20 (diff) | |
- opravene memory leaky pomocou vlagrindu
- sietovy protokol je navrhnuty tal aby client odsiselal info o tom, ze obdrzal spravu
git-svn-id: http://opensvn.csie.org/tuxanci_ng@57 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e
Diffstat (limited to 'src/item.c')
| -rw-r--r-- | src/item.c | 16 |
1 files changed, 2 insertions, 14 deletions
@@ -80,7 +80,6 @@ item_t* newItem(int x, int y, int type, int author_id) new->img = g_item[type]; #endif new->author_id = author_id; - new->lastSync = getMyTime(); switch( type ) { @@ -270,16 +269,6 @@ void eventListItem(list_t *listItem) thisItem = (item_t *)listItem->list[i]; assert( thisItem != NULL ); - if( getNetTypeGame() == NET_GAME_TYPE_CLIENT ) - { - if( currentTime - thisItem->lastSync > ITEM_SYNC_TIMEOUT ) - { - delListItem(listItem, i, destroyItem); - i--; - continue; - } - } - thisItem->count++; if( thisItem->count == ITEM_MAX_COUNT ) @@ -361,7 +350,7 @@ void mineExplosion(list_t *listItem, item_t *item) index = searchListItem(listItem, item); - assert( index != -1 ); + if( index == -1 )return; /* x = ( item->x + item->w/2 ) - ITEM_BIG_EXPLOSION_WIDTH/2; @@ -390,7 +379,6 @@ void mineExplosion(list_t *listItem, item_t *item) delListItem(listItem, index, destroyItem); } - void eventConflictShotWithItem(list_t *listItem, list_t *listShot) { shot_t *thisShot; @@ -532,7 +520,7 @@ int eventGiveTuxItem(tux_t *tux, list_t *listItem, item_t *item) index = searchListItem(listItem, item); - assert( index != -1 ); + if( index == -1 ) return -1; switch( item->type ) { |