public void LoadSky(ref Meta meta)
{
map.OpenMap(MapTypes.Internal);
map.BR.BaseStream.Position = map.MetaInfo.Offset[3] + 8;
int tempc = map.BR.ReadInt32();
int tempr = map.BR.ReadInt32() - map.SecondaryMagic;
if (tempc == 0)
{
return;
}
map.BR.BaseStream.Position = tempr + 4;
int tempident = map.Functions.ForMeta.FindMetaByID(map.BR.ReadInt32());
if (tempident != -1)
{
sky = new Sky(tempident, map);
map.BR.BaseStream.Position = map.MetaInfo.Offset[tempident] + 4;
tempident = map.Functions.ForMeta.FindMetaByID(map.BR.ReadInt32());
if (tempident != -1)
{
Meta tempmeta = new Meta(map);
tempmeta.ReadMetaFromMap(tempident, false);
SkyBox = new ParsedModel(ref tempmeta);
}
}
map.CloseMap();
}