diff options
| author | oroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-04-06 17:25:52 +0000 |
|---|---|---|
| committer | oroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-04-06 17:25:52 +0000 |
| commit | 35185452d7546ab56aa0040d7c2d68795c3f813f (patch) | |
| tree | 275025e31e94ed999019a12307dccf4fc6f9fc6a /src/item.c | |
| parent | f3cc2306be924ba521243d38d2cdea8297bdf1eb (diff) | |
- synchronizuju sa aj veci
- preklady obsahuju aj font a velkost pismen
- upravy aby to slo
( po stahnut tejto verzii sa hra musi odinstalovat a znova naonstalovat )
git-svn-id: http://opensvn.csie.org/tuxanci_ng@43 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e
Diffstat (limited to 'src/item.c')
| -rw-r--r-- | src/item.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -76,6 +76,7 @@ item_t* newItem(int x, int y, int type, tux_t *author) new->img = g_item[type]; #endif new->author = author; + new->lastSync = getMyTime(); switch( type ) { @@ -242,9 +243,12 @@ void drawListItem(list_t *listItem) void eventListItem(list_t *listItem) { + my_time_t currentTime; item_t *thisItem; int i; + currentTime = getMyTime(); + assert( listItem != NULL ); for( i = 0 ; i < listItem->count ; i++ ) @@ -252,6 +256,16 @@ 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 ) |