hedgewars/uStore.pas
changeset 12189 31184d9b9bfc
parent 12186 322aaad4a93d
child 12324 69a37922353b
--- a/hedgewars/uStore.pas	Sat Apr 08 06:22:43 2017 +0200
+++ b/hedgewars/uStore.pas	Sat Apr 08 17:17:28 2017 +0200
@@ -430,10 +430,21 @@
                     imageHeight:= tmpsurf^.h
                     end;
                 if getDimensions then
-                    begin
-                    Width:= tmpsurf^.w;
-                    Height:= tmpsurf^.h
-                    end;
+                    if Height = -1 then //BlueWater
+                        begin
+                        Width:= tmpsurf^.w;
+                        Height:= tmpsurf^.h div watFrames;
+                        end
+                    else if Height = -2 then //SDWater
+                        begin
+                        Width:= tmpsurf^.w;
+                        Height:= tmpsurf^.h div watSDFrames;
+                        end
+                    else
+                        begin
+                        Width:= tmpsurf^.w;
+                        Height:= tmpsurf^.h
+                        end;
                 if (ii in [sprSky, sprSkyL, sprSkyR, sprHorizont, sprHorizontL, sprHorizontR]) then
                     begin
                     Texture:= Surface2Tex(tmpsurf, true);