(svn r16897) -Codechange: use the 'generic' station spec to station allocation for waypoints too

This commit is contained in:
rubidium
2009-07-21 11:20:34 +00:00
parent 43eda3dfbf
commit ed5ced71c8
6 changed files with 11 additions and 33 deletions

View File

@@ -68,28 +68,6 @@ Waypoint::~Waypoint()
this->sign.MarkDirty();
}
/**
* Assign a station spec to this waypoint.
* @param index the index of the spec from the waypoint specs
*/
void Waypoint::AssignStationSpec(uint index)
{
free(this->speclist);
const StationSpec *statspec = GetCustomStationSpec(STAT_CLASS_WAYP, index);
if (statspec != NULL) {
this->speclist = MallocT<StationSpecList>(1);
this->speclist->spec = statspec;
this->speclist->grfid = statspec->grffile->grfid;
this->speclist->localidx = statspec->localidx;
this->num_specs = 1;
} else {
this->speclist = NULL;
this->num_specs = 0;
}
}
void InitializeWaypoints()
{
_waypoint_pool.CleanPool();