mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-04-21 02:30:49 +00:00
r_alias.c: for out of range skin numbers, bring back the checkerboard texture wihch was removed in the last commit
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1205 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
825e5c8f4f
commit
3806a5d2d5
1 changed files with 10 additions and 7 deletions
|
@ -621,7 +621,7 @@ R_DrawAliasModel -- johnfitz -- almost completely rewritten
|
|||
void R_DrawAliasModel (entity_t *e)
|
||||
{
|
||||
aliashdr_t *paliashdr;
|
||||
int i, anim, skinnum;
|
||||
int i, anim;
|
||||
gltexture_t *tx, *fb;
|
||||
lerpdata_t lerpdata;
|
||||
|
||||
|
@ -683,14 +683,17 @@ void R_DrawAliasModel (entity_t *e)
|
|||
//
|
||||
GL_DisableMultitexture();
|
||||
anim = (int)(cl.time*10) & 3;
|
||||
skinnum = e->skinnum;
|
||||
if ((skinnum >= paliashdr->numskins) || (skinnum < 0))
|
||||
if ((e->skinnum >= paliashdr->numskins) || (e->skinnum < 0))
|
||||
{
|
||||
Con_DPrintf ("R_DrawAliasModel: no such skin # %d\n", skinnum);
|
||||
skinnum = 0;
|
||||
Con_DPrintf ("R_DrawAliasModel: no such skin # %dn", e->skinnum);
|
||||
tx = NULL; // NULL will give the checkerboard texture
|
||||
fb = NULL;
|
||||
}
|
||||
tx = paliashdr->gltextures[skinnum][anim];
|
||||
fb = paliashdr->fbtextures[skinnum][anim];
|
||||
else
|
||||
{
|
||||
tx = paliashdr->gltextures[e->skinnum][anim];
|
||||
fb = paliashdr->fbtextures[e->skinnum][anim];
|
||||
}
|
||||
if (e->colormap != vid.colormap && !gl_nocolors.value)
|
||||
{
|
||||
i = e - cl_entities;
|
||||
|
|
Loading…
Reference in a new issue