{
struct ApiGetScoreTapeThreadData *data =
checked_malloc(sizeof(struct ApiGetScoreTapeThreadData));
- char *score_tape_filename = getScoreTapeFilename(score_tape_basename, nr);
+ char *score_tape_filename = getScoreCacheTapeFilename(score_tape_basename, nr);
data->level_nr = nr;
data->score_id = id;
int i;
// used instead of "leveldir_current->subdir" (for network games)
- InitScoreTapeDirectory(levelset.identifier, level_nr);
+ InitScoreCacheTapeDirectory(levelset.identifier, level_nr);
if (!(file = fopen(filename, MODE_WRITE)))
{
boolean PlayScoreTape(int entry_nr)
{
struct ScoreEntry *entry = &scores.entry[entry_nr];
- char *tape_filename = getScoreTapeFilename(entry->tape_basename, level_nr);
+ char *tape_filename =
+ (entry->id == -1 ?
+ getScoreTapeFilename(entry->tape_basename, level_nr) :
+ getScoreCacheTapeFilename(entry->tape_basename, level_nr));
boolean download_tape = (!fileExists(tape_filename));
if (download_tape && entry->id == -1)
// if tape recorder already contains a tape, remove it without asking
TapeErase();
- LoadScoreTape(entry->tape_basename, level_nr);
+ if (entry->id == -1)
+ LoadScoreTape(entry->tape_basename, level_nr);
+ else
+ LoadScoreCacheTape(entry->tape_basename, level_nr);
if (TAPE_IS_EMPTY(tape))
{