]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
Removed modelindexlist command from cmd.c, shifted function as cl_modelindexlist...
authordresk <dresk@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 24 Apr 2007 15:37:47 +0000 (15:37 +0000)
committerdresk <dresk@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 24 Apr 2007 15:37:47 +0000 (15:37 +0000)
Started modelindex at 1

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7176 d7cf8633-e32d-0410-b094-e92efae38249

cl_main.c
cmd.c

index 179ad70c13b0f292f1281df80ae220464c3fab16..f27d8d79327a763e5f22043d031f9ab4dbdaca0d 100644 (file)
--- a/cl_main.c
+++ b/cl_main.c
@@ -436,6 +436,24 @@ static void CL_PrintEntities_f(void)
        }
 }
 
+/*
+===============
+CL_ModelIndexList_f
+
+List all models in the client modelindex
+===============
+*/
+static void CL_ModelIndexList_f(void)
+{
+       int nModelIndexCnt = 1;
+
+       while(cl.model_precache[nModelIndexCnt])
+       { // Valid Model
+               Con_Printf("%i : %s\n", nModelIndexCnt, cl.model_precache[nModelIndexCnt]->name);
+               nModelIndexCnt++;
+       }
+}
+
 //static const vec3_t nomodelmins = {-16, -16, -16};
 //static const vec3_t nomodelmaxs = {16, 16, 16};
 void CL_UpdateRenderEntity(entity_render_t *ent)
@@ -2177,6 +2195,9 @@ void CL_Init (void)
        Cmd_AddCommand ("playdemo", CL_PlayDemo_f, "watch a demo file");
        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");
+
        Cvar_RegisterVariable (&cl_autodemo);
        Cvar_RegisterVariable (&cl_autodemo_nameformat);
 
diff --git a/cmd.c b/cmd.c
index 3526e079d688d9359c607595e5582e18feaf3224..82a98ae5e56dc947e22bffcc9760781804536266 100644 (file)
--- a/cmd.c
+++ b/cmd.c
@@ -320,25 +320,6 @@ static void Cmd_Echo_f (void)
        Con_Print("\n");
 }
 
-// DRESK - 4/24/07
-/*
-===============
-Cmd_ModelIndexList_f
-
-List all models in the model index
-===============
-*/
-static void Cmd_ModelIndexList_f(void)
-{
-       int nModelIndexCnt = 3;
-
-       while(cl.model_precache[nModelIndexCnt])
-       { // Valid Model
-               Con_Printf("%i : %s\n", nModelIndexCnt, cl.model_precache[nModelIndexCnt]->name);
-               nModelIndexCnt++;
-       }
-}
-
 // DRESK - 5/14/06
 // Support Doom3-style Toggle Console Command
 /*
@@ -710,8 +691,6 @@ void Cmd_Init_Commands (void)
        // DRESK - 5/14/06
        // Support Doom3-style Toggle Command
        Cmd_AddCommand( "toggle", Cmd_Toggle_f, "toggles a console variable's values (use for more info)");
-       // Add Model Index List Command
-       Cmd_AddCommand("modelindexlist", Cmd_ModelIndexList_f, "lists all models in the modelindex");
 }
 
 /*