| 6268 | } |
| 6269 | |
| 6270 | static void UI_UpdateCharacter( qboolean changedModel ) |
| 6271 | { |
| 6272 | menuDef_t *menu; |
| 6273 | itemDef_t *item; |
| 6274 | char modelPath[MAX_QPATH]; |
| 6275 | |
| 6276 | menu = Menu_GetFocused(); // Get current menu |
| 6277 | |
| 6278 | if (!menu) |
| 6279 | { |
| 6280 | return; |
| 6281 | } |
| 6282 | |
| 6283 | item = (itemDef_s *) Menu_FindItemByName(menu, "character"); |
| 6284 | |
| 6285 | if (!item) |
| 6286 | { |
| 6287 | Com_Error( ERR_FATAL, "UI_UpdateCharacter: Could not find item (character) in menu (%s)", menu->window.name); |
| 6288 | } |
| 6289 | |
| 6290 | ItemParse_model_g2anim_go( item, ui_char_anim.string ); |
| 6291 | |
| 6292 | Com_sprintf( modelPath, sizeof( modelPath ), "models/players/%s/model.glm", Cvar_VariableString ( "ui_char_model" ) ); |
| 6293 | ItemParse_asset_model_go( item, modelPath ); |
| 6294 | |
| 6295 | if ( changedModel ) |
| 6296 | {//set all skins to first skin since we don't know you always have all skins |
| 6297 | //FIXME: could try to keep the same spot in each list as you swtich models |
| 6298 | UI_FeederSelection(FEEDER_PLAYER_SKIN_HEAD, 0, item); //fixme, this is not really the right item!! |
| 6299 | UI_FeederSelection(FEEDER_PLAYER_SKIN_TORSO, 0, item); |
| 6300 | UI_FeederSelection(FEEDER_PLAYER_SKIN_LEGS, 0, item); |
| 6301 | UI_FeederSelection(FEEDER_COLORCHOICES, 0, item); |
| 6302 | } |
| 6303 | UI_UpdateCharacterSkin(); |
| 6304 | } |
| 6305 | |
| 6306 | void UI_UpdateSaberType( void ) |
| 6307 | { |
no test coverage detected