+static void Mod_Q3BSP_LoadBrushSides_IG(lump_t *l)
+{
+ q3dbrushside_ig_t *in;
+ q3mbrushside_t *out;
+ int i, n, count;
+
+ in = (q3dbrushside_ig_t *)(mod_base + l->fileofs);
+ if (l->filelen % sizeof(*in))
+ Host_Error("Mod_Q3BSP_LoadBrushSides: funny lump size in %s",loadmodel->name);
+ count = l->filelen / sizeof(*in);
+ out = (q3mbrushside_t *)Mem_Alloc(loadmodel->mempool, count * sizeof(*out));
+
+ loadmodel->brush.data_brushsides = out;
+ loadmodel->brush.num_brushsides = count;
+
+ for (i = 0;i < count;i++, in++, out++)
+ {
+ n = LittleLong(in->planeindex);
+ if (n < 0 || n >= loadmodel->brush.num_planes)
+ Host_Error("Mod_Q3BSP_LoadBrushSides: invalid planeindex %i (%i planes)", n, loadmodel->brush.num_planes);
+ out->plane = loadmodel->brush.data_planes + n;
+ n = LittleLong(in->textureindex);
+ if (n < 0 || n >= loadmodel->num_textures)
+ Host_Error("Mod_Q3BSP_LoadBrushSides: invalid textureindex %i (%i textures)", n, loadmodel->num_textures);
+ out->texture = loadmodel->data_textures + n;
+ }
+}
+