PRVM_G_FLOAT(OFS_RETURN) = 1;
}
-extern void CL_UpdateNetworkEntity(entity_t *e, int recursionlimit);
//#304 void() renderscene (EXT_CSQC)
static void VM_CL_R_RenderScene (void)
{
- int i;
VM_SAFEPARMCOUNT(0, VM_CL_R_RenderScene);
// we need to update any RENDER_VIEWMODEL entities at this point because
// csqc supplies its own view matrix
- for (i = 1;i < cl.num_entities;i++)
- {
- if (cl.entities_active[i])
- {
- entity_t *ent = cl.entities + i;
- if ((ent->render.flags & RENDER_VIEWMODEL) || ent->state_current.tagentity)
- CL_UpdateNetworkEntity(ent, 32);
- }
- }
- // and of course the engine viewmodel needs updating as well
- CL_UpdateNetworkEntity(&cl.viewent, 32);
+ CL_UpdateViewEntities();
// now draw stuff!
R_RenderView();
}
Matrix4x4_CreateFromQuakeEntity(&staticent->render.matrix, ent->fields.client->origin[0], ent->fields.client->origin[1], ent->fields.client->origin[2], ent->fields.client->angles[0], ent->fields.client->angles[1], ent->fields.client->angles[2], staticent->render.scale);
CL_UpdateRenderEntity(&staticent->render);
- // transparent stuff can't be lit during the opaque stage
- if (staticent->render.effects & (EF_ADDITIVE | EF_NODEPTHTEST) || staticent->render.alpha < 1)
- staticent->render.flags |= RENDER_TRANSPARENT;
- // double sided rendering mode causes backfaces to be visible
- // (mostly useful on transparent stuff)
- if (staticent->render.effects & EF_DOUBLESIDED)
- staticent->render.flags |= RENDER_NOCULLFACE;
// either fullbright or lit
if (!(staticent->render.effects & EF_FULLBRIGHT) && !r_fullbright.integer)
staticent->render.flags |= RENDER_LIGHT;
// turn off shadows from transparent objects
- if (!(staticent->render.effects & EF_NOSHADOW)
- && !(staticent->render.flags & RENDER_TRANSPARENT))
+ if (!(staticent->render.effects & (EF_NOSHADOW | EF_ADDITIVE | EF_NODEPTHTEST)) && (staticent->render.alpha >= 1))
staticent->render.flags |= RENDER_SHADOW;
}
else