From d6960d8ca04864a002e6f8a941c42dd06cb6c0fb Mon Sep 17 00:00:00 2001 From: havoc Date: Mon, 26 May 2003 18:18:59 +0000 Subject: [PATCH] fix a warning caused by the fact vertex pointers are now const git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3047 d7cf8633-e32d-0410-b094-e92efae38249 --- gl_models.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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; -- 2.39.2