From: havoc Date: Mon, 26 May 2003 18:18:59 +0000 (+0000) Subject: fix a warning caused by the fact vertex pointers are now const X-Git-Tag: xonotic-v0.1.0preview~6607 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d6960d8ca04864a002e6f8a941c42dd06cb6c0fb;p=xonotic%2Fdarkplaces.git 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 --- 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;