]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix byte color handling in iqm loader
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 16 Oct 2011 18:26:06 +0000 (18:26 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 16 Oct 2011 18:26:06 +0000 (18:26 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11432 d7cf8633-e32d-0410-b094-e92efae38249

model_alias.c

index 715bb6c69507cb9f099daf37b0a3720bccdf3456..7df23decbd42f9dacaadcce939e99d7d50cb0227 100644 (file)
@@ -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;
                }