===============
CL_ModelIndexList_f
-List all models in the client modelindex
+List information on all models in the client modelindex
===============
*/
static void CL_ModelIndexList_f(void)
{
- int nModelIndexCnt = 1;
+ int i = 1;
- while(cl.model_precache[nModelIndexCnt] && nModelIndexCnt != MAX_MODELS)
+ // Print Header
+ Con_Printf("%3s: %-30s %-8s %-8s\n", "ID", "Name", "Type", "Triangles");
+
+ while(cl.model_precache[i] && i != MAX_MODELS)
{ // Valid Model
- Con_Printf("%i : %s\n", nModelIndexCnt, cl.model_precache[nModelIndexCnt]->name);
- nModelIndexCnt++;
+ if(cl.model_precache[i]->loaded || cl.model_precache[i]->isworldmodel)
+ Con_Printf("%3i: %-30s %-8s %-10i\n", i, cl.model_precache[i]->name, cl.model_precache[i]->modeldatatypestring, cl.model_precache[i]->surfmesh.num_triangles);
+ else
+ Con_Printf("%3i: %-30s %-30s\n", i, cl.model_precache[i]->name, "--no local model found--");
+ i++;
}
}
*/
static void CL_SoundIndexList_f(void)
{
- int nSoundIndexCnt = 1;
+ int i = 1;
- while(cl.sound_precache[nSoundIndexCnt] && nSoundIndexCnt != MAX_SOUNDS)
+ while(cl.sound_precache[i] && i != MAX_SOUNDS)
{ // Valid Sound
- Con_Printf("%i : %s\n", nSoundIndexCnt, cl.sound_precache[nSoundIndexCnt]->name);
- nSoundIndexCnt++;
+ Con_Printf("%i : %s\n", i, cl.sound_precache[i]->name);
+ i++;
}
}
Cmd_AddCommand ("timedemo", CL_TimeDemo_f, "play back a demo as fast as possible and save statistics to benchmark.log");
// Support Client-side Model Index List
- Cmd_AddCommand ("cl_modelindexlist", CL_ModelIndexList_f, "list all models in the client modelindex");
+ Cmd_AddCommand ("cl_modelindexlist", CL_ModelIndexList_f, "list information on all models in the client modelindex");
// Support Client-side Sound Index List
Cmd_AddCommand ("cl_soundindexlist", CL_SoundIndexList_f, "list all sounds in the client soundindex");
Host_Error ("%s has wrong version number (%i should be %i)",
loadmodel->name, version, ALIAS_VERSION);
+ loadmodel->modeldatatypestring = "MDL";
+
loadmodel->type = mod_alias;
loadmodel->DrawSky = NULL;
loadmodel->Draw = R_Q1BSP_Draw;
Host_Error ("%s has wrong version number (%i should be %i)",
loadmodel->name, version, MD2ALIAS_VERSION);
+ loadmodel->modeldatatypestring = "MD2";
+
loadmodel->type = mod_alias;
loadmodel->DrawSky = NULL;
loadmodel->Draw = R_Q1BSP_Draw;
if (loadmodel->numskins < 1)
loadmodel->numskins = 1;
+ loadmodel->modeldatatypestring = "MD3";
+
loadmodel->type = mod_alias;
loadmodel->DrawSky = NULL;
loadmodel->Draw = R_Q1BSP_Draw;
if (BigLong(pinmodel->type) != 1)
Host_Error ("Mod_ZYMOTICMODEL_Load: only type 1 (skeletal pose) models are currently supported (name = %s)", loadmodel->name);
+ loadmodel->modeldatatypestring = "ZYM";
+
loadmodel->type = mod_alias;
loadmodel->synctype = ST_RAND;
if (BigLong(pheader->type) != 2)
Host_Error ("Mod_DARKPLACESMODEL_Load: only type 2 (hierarchical skeletal pose) models are currently supported (name = %s)", loadmodel->name);
+ loadmodel->modeldatatypestring = "DPM";
+
loadmodel->type = mod_alias;
loadmodel->synctype = ST_RAND;
if (strcmp(pchunk->id, "ACTRHEAD"))
Host_Error ("Mod_PSKMODEL_Load: %s is not an Unreal Engine ActorX (.psk + .psa) model", loadmodel->name);
+ loadmodel->modeldatatypestring = "PSK";
+
loadmodel->type = mod_alias;
loadmodel->DrawSky = NULL;
loadmodel->Draw = R_Q1BSP_Draw;
dheader_t _header;
hullinfo_t hullinfo;
+ mod->modeldatatypestring = "Q1BSP";
+
mod->type = mod_brushq1;
if (!memcmp (buffer, "MCBSPpad", 8))
VectorClear (hullinfo.hullsizes[0][1]);
if (mod->brush.ishlbsp)
{
+ mod->modeldatatypestring = "HLBSP";
+
hullinfo.numhulls = 4;
hullinfo.filehulls = 4;
VectorSet (hullinfo.hullsizes[1][0], -16, -16, -36);
Host_Error("Mod_Q2BSP_Load: not yet implemented");
+ mod->modeldatatypestring = "Q2BSP";
+
mod->type = mod_brushq2;
header = (q2dheader_t *)buffer;
float corner[3], yawradius, modelradius;
msurface_t *surface;
+ mod->modeldatatypestring = "Q3BSP";
+
mod->type = mod_brushq3;
mod->numframes = 2; // although alternate textures are not supported it is annoying to complain about no such frame 1
mod->numskins = 1;
msurface_lightmapinfo_t *data_surfaces_lightmapinfo;
// all surfaces belong to this mesh
surfmesh_t surfmesh;
+ // data type of model
+ const char *modeldatatypestring;
// draw the model's sky polygons (only used by brush models)
void(*DrawSky)(struct entity_render_s *ent);
// draw the model using lightmap/dlight shading
datapointer = (unsigned char *)buffer;
+ loadmodel->modeldatatypestring = "SPR1";
+
loadmodel->type = mod_sprite;
loadmodel->DrawSky = NULL;
float modelradius;
int texflags = (r_mipsprites.integer ? TEXF_MIPMAP : 0) | (r_picmipsprites.integer ? TEXF_PICMIP : 0) | TEXF_ALPHA | TEXF_CLAMP | TEXF_PRECACHE;
+ loadmodel->modeldatatypestring = "SPR2";
+
loadmodel->type = mod_sprite;
loadmodel->DrawSky = NULL;