From c8eeae0e243fac0e352d2d99ca8fdccc734c86df Mon Sep 17 00:00:00 2001 From: havoc Date: Sun, 16 Oct 2011 18:26:06 +0000 Subject: [PATCH] fix byte color handling in iqm loader git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11432 d7cf8633-e32d-0410-b094-e92efae38249 --- model_alias.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/model_alias.c b/model_alias.c index 715bb6c6..7df23dec 100644 --- a/model_alias.c +++ b/model_alias.c @@ -3730,10 +3730,10 @@ void Mod_INTERQUAKEMODEL_Load(dp_model_t *mod, void *buffer, void *bufferend) // this unaligned memory access is safe (all bytes) for (i = 0;i < (int)header.num_vertexes;i++) { - outcolor[0] = vcolor4ub[0] * (1.0f / 128.0f); - outcolor[1] = vcolor4ub[1] * (1.0f / 128.0f); - outcolor[2] = vcolor4ub[2] * (1.0f / 128.0f); - outcolor[3] = vcolor4ub[3] * (1.0f / 128.0f); + outcolor[0] = vcolor4ub[0] * (1.0f / 255.0f); + outcolor[1] = vcolor4ub[1] * (1.0f / 255.0f); + outcolor[2] = vcolor4ub[2] * (1.0f / 255.0f); + outcolor[3] = vcolor4ub[3] * (1.0f / 255.0f); vcolor4ub += 4; outcolor += 4; } -- 2.39.2