mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-02 14:01:26 +00:00
r_alias.c: display skin 0 instead of checkerboard for invalid skin num
metlslime says: > I was the one that at added the blue checkerboard feature. > I didn't realize at the time how many mods relied on the behavior of > vanilla quake to show skin 0 when the mod asks for an invalid skin. So > I now agree, the engine should replicate vanilla quake's permissive > behavior and maybe just put up a non-spamy console warning when the > bad skin is first set. TODO: The warning is currently spammy (but only if developer 1). Would be a bit of a pain to make non-spammy. git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1532 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
7ac26b0a66
commit
caceebb7a3
1 changed files with 8 additions and 10 deletions
|
@ -622,7 +622,7 @@ R_DrawAliasModel -- johnfitz -- almost completely rewritten
|
|||
void R_DrawAliasModel (entity_t *e)
|
||||
{
|
||||
aliashdr_t *paliashdr;
|
||||
int i, anim;
|
||||
int i, anim, skinnum;
|
||||
gltexture_t *tx, *fb;
|
||||
lerpdata_t lerpdata;
|
||||
qboolean alphatest = !!(e->model->flags & MF_HOLEY);
|
||||
|
@ -687,17 +687,15 @@ void R_DrawAliasModel (entity_t *e)
|
|||
//
|
||||
GL_DisableMultitexture();
|
||||
anim = (int)(cl.time*10) & 3;
|
||||
if ((e->skinnum >= paliashdr->numskins) || (e->skinnum < 0))
|
||||
skinnum = e->skinnum;
|
||||
if ((skinnum >= paliashdr->numskins) || (skinnum < 0))
|
||||
{
|
||||
Con_DPrintf ("R_DrawAliasModel: no such skin # %d for '%s'\n", e->skinnum, e->model->name);
|
||||
tx = NULL; // NULL will give the checkerboard texture
|
||||
fb = NULL;
|
||||
Con_DPrintf ("R_DrawAliasModel: no such skin # %d for '%s'\n", skinnum, e->model->name);
|
||||
// ericw -- display skin 0 for winquake compatibility
|
||||
skinnum = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
tx = paliashdr->gltextures[e->skinnum][anim];
|
||||
fb = paliashdr->fbtextures[e->skinnum][anim];
|
||||
}
|
||||
tx = paliashdr->gltextures[skinnum][anim];
|
||||
fb = paliashdr->fbtextures[skinnum][anim];
|
||||
if (e->colormap != vid.colormap && !gl_nocolors.value)
|
||||
{
|
||||
i = e - cl_entities;
|
||||
|
|
Loading…
Reference in a new issue