Host_Error ("PF_Precache_*: Precache can only be done in spawn functions");
s = G_STRING(OFS_PARM0);
- if (sv.worldmodel->brushq1.ishlbsp && ((!s) || (!s[0])))
+ if (sv.worldmodel->brush.ishlbsp && ((!s) || (!s[0])))
return;
G_INT(OFS_RETURN) = G_INT(OFS_PARM0);
PR_CheckEmptyString (s);
if (modelindex < 1 || modelindex >= MAX_MODELS)
return NULL;
model = sv.models[modelindex];
- if (model->type != mod_brush)
- return NULL;
if (surfnum < 0 || surfnum >= model->brushq1.nummodelsurfaces)
return NULL;
return model->brushq1.surfaces + surfnum + model->brushq1.firstmodelsurface;
if (modelindex < 1 || modelindex >= MAX_MODELS)
return;
model = sv.models[modelindex];
- if (model->type != mod_brush)
+ if (!model->brushq1.numsurfaces)
return;
// FIXME: implement rotation/scaling