(svn r9601) -Codechange: Store grf file reference in station spec, not just GRF ID

This commit is contained in:
peter1138
2007-04-11 21:04:03 +00:00
parent f7a92a2f16
commit 3148fdca59
5 changed files with 9 additions and 7 deletions

View File

@@ -184,7 +184,7 @@ const StationSpec *GetCustomStationSpecByGrf(uint32 grfid, byte localidx)
for (j = 0; j < station_classes[i].stations; j++) {
const StationSpec *statspec = station_classes[i].spec[j];
if (statspec == NULL) continue;
if (statspec->grfid == grfid && statspec->localidx == localidx) return statspec;
if (statspec->grffile->grfid == grfid && statspec->localidx == localidx) return statspec;
}
}
@@ -638,7 +638,7 @@ int AllocateSpecToStation(const StationSpec *statspec, Station *st, bool exec)
}
st->speclist[i].spec = statspec;
st->speclist[i].grfid = statspec->grfid;
st->speclist[i].grfid = statspec->grffile->grfid;
st->speclist[i].localidx = statspec->localidx;
}