(svn r16338) -Codechange: split loading of references to two phases
In the first phase, indexes are stored. In the second phase, indexes are checked for validity and converted to pointers
This commit is contained in:
@@ -732,6 +732,14 @@ void Load_VEHS()
|
||||
}
|
||||
}
|
||||
|
||||
void Ptrs_VEHS()
|
||||
{
|
||||
Vehicle *v;
|
||||
FOR_ALL_VEHICLES(v) {
|
||||
SlObject(v, GetVehicleDescription(v->type));
|
||||
}
|
||||
}
|
||||
|
||||
extern const ChunkHandler _veh_chunk_handlers[] = {
|
||||
{ 'VEHS', Save_VEHS, Load_VEHS, CH_SPARSE_ARRAY | CH_LAST},
|
||||
{ 'VEHS', Save_VEHS, Load_VEHS, Ptrs_VEHS, CH_SPARSE_ARRAY | CH_LAST},
|
||||
};
|
||||
|
Reference in New Issue
Block a user