fixes iqm again, 'fixes' the white textures on xavior's map.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3935 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2011-12-23 15:32:26 +00:00
parent 354879befc
commit 1cd1453a42
2 changed files with 6 additions and 5 deletions

View file

@ -947,16 +947,16 @@ float *Alias_GetBonePositions(galiasinfo_t *inf, framestate_t *fstate, float *bu
if (!inf->numswtransforms && renderable)
{
float tmp[12];
float absbuf[MAX_BONES][12];
for (i = 0; i < numbones; i++)
{
if (bones[i].parent >= 0)
R_ConcatTransforms((void*)(buffer + bones[i].parent*12), (void*)((float*)relations+i*12), (void*)tmp);
R_ConcatTransforms((void*)(absbuf[bones[i].parent]), (void*)((float*)relations+i*12), (void*)absbuf[i]);
else
for (k = 0;k < 12;k++) //parentless
tmp[k] = ((float*)relations)[i*12+k];
absbuf[i][k] = ((float*)relations)[i*12+k];
R_ConcatTransforms((void*)tmp, (void*)bones[i].inverse, (void*)(buffer+i*12));
R_ConcatTransforms((void*)absbuf[i], (void*)bones[i].inverse, (void*)(buffer+i*12));
}
}
else

View file

@ -913,6 +913,7 @@ static void T_Gen_CurrentRender(int tmu)
static void Shader_BindTextureForPass(int tmu, const shaderpass_t *pass, qboolean useclientarray)
{
extern texid_t missing_texture;
extern texid_t scenepp_postproc_cube;
texid_t t;
switch(pass->texgen)
@ -931,7 +932,7 @@ static void Shader_BindTextureForPass(int tmu, const shaderpass_t *pass, qboolea
t = shaderstate.curdeluxmap;
break;
case T_GEN_DIFFUSE:
t = shaderstate.curtexnums?shaderstate.curtexnums->base:r_nulltex;
t = (shaderstate.curtexnums && TEXVALID(shaderstate.curtexnums->base))?shaderstate.curtexnums->base:missing_texture;
break;
case T_GEN_NORMALMAP:
t = shaderstate.curtexnums?shaderstate.curtexnums->bump:r_nulltex; /*FIXME: nulltex is not correct*/