Merge branch 'master' of github.com:r0ket/r0ket

This commit is contained in:
schneider 2011-12-21 15:59:19 +01:00
commit 093f8a2bfa
1 changed files with 11 additions and 2 deletions

View File

@ -315,8 +315,17 @@ void processPacket(struct packet *p)
void processAnnounce(struct announce *a)
{
if( gamecount < sizeof(games)/sizeof(games[0]) ){
games[gamecount] = *a;
gamecount++;
int repeat=0;
int i;
for (i=0; i<gamecount; i++){
if (a->gameId == games[i].gameId){
repeat=1;
}
}
if (repeat!=1){
games[gamecount] = *a;
gamecount++;
}
}
}