hedgewars/uStore.pas
changeset 3558 86a4437e614b
parent 3537 8f5b3108f29c
child 3594 aeca3d8f1b29
--- a/hedgewars/uStore.pas	Sat Jun 26 04:36:28 2010 +0200
+++ b/hedgewars/uStore.pas	Fri Jun 25 22:59:31 2010 -0400
@@ -406,10 +406,16 @@
 
             if tmpsurf <> nil then
             begin
-                if imageWidth = 0 then imageWidth:= tmpsurf^.w;
-                if imageHeight = 0 then imageHeight:= tmpsurf^.h;
-                if Width = 0 then Width:= tmpsurf^.w;
-                if Height = 0 then Height:= tmpsurf^.h;
+                if getImageDimensions then
+                    begin
+                    imageWidth:= tmpsurf^.w;
+                    imageHeight:= tmpsurf^.h
+                    end;
+                if getDimensions then
+                    begin
+                    Width:= tmpsurf^.w;
+                    Height:= tmpsurf^.h
+                    end;
                 if (ii in [sprSky, sprSkyL, sprSkyR, sprHorizont, sprHorizontL, sprHorizontR]) then
                     begin
                     Texture:= Surface2Tex(tmpsurf, true);