From a08a8afb56a82cff489f82cdec1b802c76d0326e Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Fri, 2 Feb 2001 02:05:01 +0000 Subject: Changed model precache system. A steaming pile of transnetwork bugfixes. --- src/game/bg_misc.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'src/game/bg_misc.c') diff --git a/src/game/bg_misc.c b/src/game/bg_misc.c index b4ca57c8..25ade6fd 100644 --- a/src/game/bg_misc.c +++ b/src/game/bg_misc.c @@ -889,6 +889,34 @@ Only in CTF games int bg_numItems = sizeof(bg_itemlist) / sizeof(bg_itemlist[0]) - 1; +classModelName_t bg_pModelList[ ] = +{ + { PCL_D_O_BASE, "klesk" }, + { PCL_D_D_BASE, "orbb" }, + { PCL_D_B_BASE, "lucy" }, + { PCL_H_BASE, "sarge" }, +}; + +int bg_numPModels = sizeof( bg_pModelList ) / sizeof( bg_pModelList[ 0 ] ); + +/* +============== +BG_FindModelNameForClass +============== +*/ +char *BG_FindModelNameForClass( int pclass ) +{ + int i; + + for( i = 0; i < bg_numPModels; i++ ) + { + if( bg_pModelList[ i ].classNum == pclass ) + return bg_pModelList[ i ].className; + } + + //wimp out + return bg_pModelList[ 0 ].className; +} /* ============== -- cgit