X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=blobdiff_plain;f=gl_models.c;h=3cbd420b12be0ca761d9df031822a86daca6c56b;hp=675ef2ba2280f81c48a15243b99dd230439cc9b9;hb=3f2bc4a392c209700360c90bcfcf826b135c898d;hpb=c8630f49b9fe6321ff9778ea79bd062d812e513d diff --git a/gl_models.c b/gl_models.c index 675ef2ba..3cbd420b 100644 --- a/gl_models.c +++ b/gl_models.c @@ -161,7 +161,7 @@ aliasskin_t *R_FetchAliasSkin(const entity_render_t *ent, const aliasmesh_t *mes void R_DrawAliasModelCallback (const void *calldata1, int calldata2) { int c, fullbright, layernum, firstpass; - float tint[3], fog, ifog, colorscale, ambientcolor4f[4]; + float tint[3], fog, ifog, colorscale, ambientcolor4f[4], *fcolor; vec3_t diff; qbyte *bcolor; rmeshstate_t m; @@ -305,7 +305,8 @@ void R_DrawAliasModelCallback (const void *calldata1, int calldata2) if (R_Mesh_CacheArray(&request)) { // save off the color pointer before we blow away the request - m.pointer_color = request.data; + fcolor = request.data; + m.pointer_color = fcolor; // request normal3f cache request.data_size = mesh->num_vertices * sizeof(float[3]); request.id_pointer1 = NULL; @@ -313,7 +314,7 @@ void R_DrawAliasModelCallback (const void *calldata1, int calldata2) request.id_number3 = CRC_Block((void *)ent->frameblend, sizeof(ent->frameblend)); if (R_Mesh_CacheArray(&request)) R_Model_Alias_GetMesh_Array3f(ent, mesh, MODELARRAY_NORMAL, request.data); - R_LightModel_CalcVertexColors(ambientcolor4f, mesh->num_vertices, m.pointer_vertex, request.data, m.pointer_color); + R_LightModel_CalcVertexColors(ambientcolor4f, mesh->num_vertices, m.pointer_vertex, request.data, fcolor); } else m.pointer_color = request.data;