From: havoc Date: Sun, 16 Oct 2011 18:26:06 +0000 (+0000) Subject: fix byte color handling in iqm loader X-Git-Tag: xonotic-v0.6.0~163^2~125 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c8eeae0e243fac0e352d2d99ca8fdccc734c86df;p=xonotic%2Fdarkplaces.git fix byte color handling in iqm loader git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11432 d7cf8633-e32d-0410-b094-e92efae38249 --- 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; }