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 9db05a5..367d9e9 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;