]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
an x for an i... fixed (this bug made sprites disappear completely)
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 29 Nov 2007 21:48:27 +0000 (21:48 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 29 Nov 2007 21:48:27 +0000 (21:48 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7738 d7cf8633-e32d-0410-b094-e92efae38249

model_sprite.c

index ed618b5311cce6e7f1314e1afd938a1c8f16d928..2cdb741ab433214ed6d607a8aa6ec2999b65873b 100644 (file)
@@ -197,10 +197,10 @@ static void Mod_Sprite_SharedSetup(const unsigned char *datapointer, int version
                                                {
                                                        for (x = 0;x < width*height;x++)
                                                        {
-                                                               pixels[i*4+2] = datapointer[i*4+0];
-                                                               pixels[i*4+1] = datapointer[i*4+1];
-                                                               pixels[i*4+0] = datapointer[i*4+2];
-                                                               pixels[i*4+3] = datapointer[i*4+3];
+                                                               pixels[x*4+2] = datapointer[x*4+0];
+                                                               pixels[x*4+1] = datapointer[x*4+1];
+                                                               pixels[x*4+0] = datapointer[x*4+2];
+                                                               pixels[x*4+3] = datapointer[x*4+3];
                                                        }
                                                }
                                                else //if (version == SPRITEHL_VERSION || version == SPRITE_VERSION)