]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix sp2 frame positioning
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 1 Jan 2006 15:10:01 +0000 (15:10 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 1 Jan 2006 15:10:01 +0000 (15:10 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5887 d7cf8633-e32d-0410-b094-e92efae38249

model_sprite.c

index 9db05a57db22fdb4ecd5bcc6f77ca4800dec8d34..367d9e9e849cc1920af28808953efc985de9fc88 100644 (file)
@@ -367,8 +367,10 @@ void Mod_IDS2_Load(model_t *mod, void *buffer, void *bufferend)
 
                sprframe = &loadmodel->sprite.sprdata_frames[i];
 
-               sprframe->left = origin[0];
-               sprframe->right = origin[0] + width;
+               // note that sp2 origin[0] is positive, where as it is negative in
+               // spr/spr32/hlspr
+               sprframe->left = -origin[0];
+               sprframe->right = -origin[0] + width;
                sprframe->up = origin[1];
                sprframe->down = origin[1] - height;