diff server/gamehand.c server/gamehand.c --- server/gamehand.c Sat Aug 19 23:29:50 2000 +++ server/gamehand.c Mon Aug 21 03:12:00 2000 @@ -208,6 +208,7 @@ { struct packet_game_info ginfo; int i; + int global_advances[B_LAST]; if (dest==NULL) dest = &game.est_connections; @@ -229,8 +230,6 @@ ginfo.foodbox = game.foodbox; ginfo.civstyle=game.civstyle; ginfo.spacerace = game.spacerace; - for(i=0; i<A_LAST/*game.num_tech_types*/; i++) - ginfo.global_advances[i]=game.global_advances[i]; for(i=0; i<B_LAST; i++) ginfo.global_wonders[i]=game.global_wonders[i]; /* the following values are computed every @@ -241,6 +240,23 @@ conn_list_iterate(*dest, pconn) { /* ? fixme: check for non-players: */ ginfo.player_idx = (pconn->player ? pconn->player->player_no : -1); + + /* Following may differ between players. */ + memset(&global_advances, 0, sizeof(global_advances)); + if (pconn->player ) { + for (i=0; i<B_LAST; i++) { + /* Building is existing obsolete wonder or obsolete wonder player is + able to build. */ + if (is_wonder(i) && wonder_obsolete(i) && + (game.global_wonders[i] || + get_invention( pconn->player, improvement_types[i].tech_req) == + TECH_KNOWN)) + global_advances[improvement_types[i].obsolete_by] = 1; + } + } + for(i=A_NONE; i<A_LAST/*game.num_tech_types*/; i++) + ginfo.global_advances[i]=global_advances[i]; + send_packet_game_info(pconn, &ginfo); } conn_list_iterate_end;