Beispiel #1
0
    void ReadEntities(DataStream ds)
    {
        var base_offset = this.header.entities.fileofs;

        ds.seek(base_offset);

        string data = ds.readString(this.header.entities.filelen);

        this.entities = EntityReader.ReadEntities(data);

        foreach (var entity in this.entities)
        {
            if (entity.model != -1)
            {
                var model = FindModel(entity.model);
                model.entity    = entity;
                entity.modelRef = model;
            }
        }
    }