git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9457
d7cf8633-e32d-0410-b094-
e92efae38249
{
// use an alternate animation if the entity's frame is not 0,
// and only if the texture has an alternate animation
{
// use an alternate animation if the entity's frame is not 0,
// and only if the texture has an alternate animation
- if (rsurface.frameblend[0].subframe != 0 && t->anim_total[1])
+ if (rsurface.ent_alttextures && t->anim_total[1])
t = t->anim_frames[1][(t->anim_total[1] >= 2) ? ((int)(r_refdef.scene.time * 5.0f) % t->anim_total[1]) : 0];
else
t = t->anim_frames[0][(t->anim_total[0] >= 2) ? ((int)(r_refdef.scene.time * 5.0f) % t->anim_total[0]) : 0];
t = t->anim_frames[1][(t->anim_total[1] >= 2) ? ((int)(r_refdef.scene.time * 5.0f) % t->anim_total[1]) : 0];
else
t = t->anim_frames[0][(t->anim_total[0] >= 2) ? ((int)(r_refdef.scene.time * 5.0f) % t->anim_total[0]) : 0];
VectorSet(rsurface.glowmod, 1, 1, 1);
memset(rsurface.frameblend, 0, sizeof(rsurface.frameblend));
rsurface.frameblend[0].lerp = 1;
VectorSet(rsurface.glowmod, 1, 1, 1);
memset(rsurface.frameblend, 0, sizeof(rsurface.frameblend));
rsurface.frameblend[0].lerp = 1;
+ rsurface.ent_alttextures = false;
rsurface.basepolygonfactor = r_refdef.polygonfactor;
rsurface.basepolygonoffset = r_refdef.polygonoffset;
rsurface.modelvertex3f = model->surfmesh.data_vertex3f;
rsurface.basepolygonfactor = r_refdef.polygonfactor;
rsurface.basepolygonoffset = r_refdef.polygonoffset;
rsurface.modelvertex3f = model->surfmesh.data_vertex3f;
VectorCopy(ent->colormap_shirtcolor, rsurface.colormap_shirtcolor);
VectorCopy(ent->glowmod, rsurface.glowmod);
memcpy(rsurface.frameblend, ent->frameblend, sizeof(ent->frameblend));
VectorCopy(ent->colormap_shirtcolor, rsurface.colormap_shirtcolor);
VectorCopy(ent->glowmod, rsurface.glowmod);
memcpy(rsurface.frameblend, ent->frameblend, sizeof(ent->frameblend));
+ rsurface.ent_alttextures = ent->framegroupblend[0].frame != 0;
rsurface.basepolygonfactor = r_refdef.polygonfactor;
rsurface.basepolygonoffset = r_refdef.polygonoffset;
if (ent->model->brush.submodel)
rsurface.basepolygonfactor = r_refdef.polygonfactor;
rsurface.basepolygonoffset = r_refdef.polygonoffset;
if (ent->model->brush.submodel)
VectorSet(rsurface.glowmod, 1, 1, 1);
memset(rsurface.frameblend, 0, sizeof(rsurface.frameblend));
rsurface.frameblend[0].lerp = 1;
VectorSet(rsurface.glowmod, 1, 1, 1);
memset(rsurface.frameblend, 0, sizeof(rsurface.frameblend));
rsurface.frameblend[0].lerp = 1;
+ rsurface.ent_alttextures = false;
rsurface.basepolygonfactor = r_refdef.polygonfactor;
rsurface.basepolygonoffset = r_refdef.polygonoffset;
if (wanttangents)
rsurface.basepolygonfactor = r_refdef.polygonfactor;
rsurface.basepolygonoffset = r_refdef.polygonoffset;
if (wanttangents)
int ent_flags;
float ent_shadertime;
float ent_color[4];
int ent_flags;
float ent_shadertime;
float ent_color[4];
+ int ent_alttextures; // used by q1bsp animated textures (pressed buttons)
// transform matrices to render this entity and effects on this entity
matrix4x4_t matrix;
matrix4x4_t inversematrix;
// transform matrices to render this entity and effects on this entity
matrix4x4_t matrix;
matrix4x4_t inversematrix;