Skip to content

Commit

Permalink
Ghoul2 SP enhancment addressing Issue #1005 (#1008)
Browse files Browse the repository at this point in the history
* Modified tr_ghoul2.cpp, Lines: 3579-3603 to address enhancment issue #1005.
  • Loading branch information
Archangel35757 authored and xycaleth committed Apr 28, 2019
1 parent 204aa85 commit 5f3389a
Showing 1 changed file with 23 additions and 10 deletions.
33 changes: 23 additions & 10 deletions code/rd-vanilla/tr_ghoul2.cpp
Expand Up @@ -3569,18 +3569,31 @@ qboolean R_LoadMDXM( model_t *mod, void *buffer, const char *mod_name, qboolean

// first up, go load in the animation file we need that has the skeletal animation info for this model
mdxm->animIndex = RE_RegisterModel(va ("%s.gla",mdxm->animName));
if (!strcmp(mdxm->animName,"models/players/_humanoid/_humanoid"))
{ //if we're loading the humanoid, look for a cinematic gla for this map
const char*mapname = sv_mapname->string;
if (strcmp(mapname,"nomap") )

char animGLAName[MAX_QPATH];
char *strippedName;
char *slash = NULL;
const char*mapname = sv_mapname->string;

if (strcmp(mapname,"nomap") )
{
if (strrchr(mapname,'/') ) //maps in subfolders use the root name, ( presuming only one level deep!)
{
if (strrchr(mapname,'/') ) //maps in subfolders use the root name, ( presuming only one level deep!)
{
mapname = strrchr(mapname,'/')+1;
}
RE_RegisterModel(va ("models/players/_humanoid_%s/_humanoid_%s.gla",mapname,mapname));
mapname = strrchr(mapname,'/')+1;
}
}
//stripped name of GLA for this model
Q_strncpyz(animGLAName, mdxm->animName, sizeof(animGLAName));
slash = strrchr(animGLAName, '/');
if (slash)
{
*slash = 0;
}
strippedName = COM_SkipPath(animGLAName);
if (VALIDSTRING(strippedName))
{
RE_RegisterModel(va("models/players/%s_%s/%s_%s.gla", strippedName, mapname, strippedName, mapname));
}
}

#ifndef JK2_MODE
bool isAnOldModelFile = false;
Expand Down

0 comments on commit 5f3389a

Please sign in to comment.