mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-04-19 08:31:49 +00:00
Remove S_RegisterSexedModel().
I new that it was unused, I left it in the code because I thought it might be usefull one day. It wasn't, so finally remove it. Closes #425.
This commit is contained in:
parent
56b3d91786
commit
e3d4038233
1 changed files with 0 additions and 64 deletions
|
@ -29,70 +29,6 @@
|
|||
|
||||
extern struct model_s *cl_mod_powerscreen;
|
||||
|
||||
struct model_s *
|
||||
S_RegisterSexedModel(entity_state_t *ent, char *base)
|
||||
{
|
||||
int n;
|
||||
char *p;
|
||||
struct model_s *md2;
|
||||
char model[MAX_QPATH];
|
||||
char buffer[MAX_QPATH];
|
||||
|
||||
/* determine what model the client is using */
|
||||
model[0] = 0;
|
||||
n = CS_PLAYERSKINS + ent->number - 1;
|
||||
|
||||
if (cl.configstrings[n][0])
|
||||
{
|
||||
p = strchr(cl.configstrings[n], '\\');
|
||||
|
||||
if (p)
|
||||
{
|
||||
p += 1;
|
||||
strcpy(model, p);
|
||||
p = strchr(model, '/');
|
||||
|
||||
if (p)
|
||||
{
|
||||
*p = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* if we can't figure it out, they're male */
|
||||
if (!model[0])
|
||||
{
|
||||
strcpy(model, "male");
|
||||
}
|
||||
|
||||
Com_sprintf(buffer, sizeof(buffer), "players/%s/%s", model, base + 1);
|
||||
md2 = R_RegisterModel(buffer);
|
||||
|
||||
if (!md2)
|
||||
{
|
||||
/* not found, try default weapon model */
|
||||
Com_sprintf(buffer, sizeof(buffer), "players/%s/weapon.md2", model);
|
||||
md2 = R_RegisterModel(buffer);
|
||||
|
||||
if (!md2)
|
||||
{
|
||||
/* no, revert to the male model */
|
||||
Com_sprintf(buffer, sizeof(buffer), "players/%s/%s",
|
||||
"male", base + 1);
|
||||
md2 = R_RegisterModel(buffer);
|
||||
|
||||
if (!md2)
|
||||
{
|
||||
/* last try, default male weapon.md2 */
|
||||
Com_sprintf(buffer, sizeof(buffer), "players/male/weapon.md2");
|
||||
md2 = R_RegisterModel(buffer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return md2;
|
||||
}
|
||||
|
||||
void
|
||||
CL_AddPacketEntities(frame_t *frame)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue