- /* if we recorded some replays during this run, we check them.
- we remove those which are too short */
- if (game->replays_recorded)
- {
- GList *citer;
-
- /* check all caves */
- for (citer = gd_caveset; citer != NULL; citer = citer->next)
- {
- GdCave *cave = (GdCave *)citer->data;
- GList *riter;
-
- /* check replays of all caves */
- for (riter = cave->replays; riter != NULL; )
- {
- GdReplay *replay = (GdReplay *)riter->data;
-
- /* remember next iter, as we may delete the current */
- GList *nextrep = riter->next;
-
- /* if we recorded this replay now, and it is too short, we delete it */
- /* but do not delete successful ones! */
- if (g_list_find(game->replays_recorded, replay) &&
- (replay->movements->len < 16) &&
- (!replay->success))
- {
- /* delete from list */
- cave->replays = g_list_delete_link(cave->replays, riter);
-
- /* also free replay */
- gd_replay_free(replay);
- }
-
- riter = nextrep;
- }
- }
-
- /* free the list of newly recorded replays, as we checked them */
- g_list_free(game->replays_recorded);
- game->replays_recorded = NULL;
- }
-