]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
Implemented console command 'modelindexlist' which lists all the models and their...
authordresk <dresk@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 24 Apr 2007 15:21:56 +0000 (15:21 +0000)
committerdresk <dresk@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 24 Apr 2007 15:21:56 +0000 (15:21 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7174 d7cf8633-e32d-0410-b094-e92efae38249

cmd.c

diff --git a/cmd.c b/cmd.c
index 82a98ae5e56dc947e22bffcc9760781804536266..3526e079d688d9359c607595e5582e18feaf3224 100644 (file)
--- a/cmd.c
+++ b/cmd.c
@@ -320,6 +320,25 @@ 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
 /*
@@ -691,6 +710,8 @@ 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");
 }
 
 /*