| 515 | } |
| 516 | |
| 517 | void G_LoadAnimFileSet( gentity_t *ent, const char *modelName ) |
| 518 | { |
| 519 | //load its animation config |
| 520 | char animName[MAX_QPATH]; |
| 521 | char *GLAName; |
| 522 | char *slash = NULL; |
| 523 | char *strippedName; |
| 524 | |
| 525 | if ( ent->playerModel == -1 ) |
| 526 | { |
| 527 | return; |
| 528 | } |
| 529 | //get the location of the animation.cfg |
| 530 | GLAName = gi.G2API_GetGLAName( &ent->ghoul2[ent->playerModel] ); |
| 531 | //now load and parse the animation.cfg, animsounds.cfg and set the animFileIndex |
| 532 | if ( !GLAName) |
| 533 | { |
| 534 | Com_Printf( S_COLOR_RED"Failed find animation file name models/players/%s/animation.cfg\n", modelName ); |
| 535 | strippedName="broken"; |
| 536 | } |
| 537 | else |
| 538 | { |
| 539 | Q_strncpyz(animName, GLAName, sizeof( animName )); |
| 540 | slash = strrchr( animName, '/' ); |
| 541 | if ( slash ) |
| 542 | { |
| 543 | *slash = 0; |
| 544 | } |
| 545 | strippedName = COM_SkipPath( animName ); |
| 546 | } |
| 547 | |
| 548 | //now load and parse the animation.cfg, animsounds.cfg and set the animFileIndex |
| 549 | if ( !G_ParseAnimFileSet( modelName, strippedName, &ent->client->clientInfo.animFileIndex ) ) |
| 550 | { |
| 551 | Com_Printf( S_COLOR_RED"Failed to load animation file set models/players/%s/animation.cfg\n", modelName ); |
| 552 | } |
| 553 | } |
| 554 | |
| 555 | |
| 556 | void NPC_PrecacheAnimationCFG( const char *NPC_type ) |
no test coverage detected