Change water speed range for better precision
authorKoBeWi <kobewi4e@gmail.com>
Tue, 18 Apr 2017 22:27:25 +0200
changeset 12282 c0ace4bf45fa
parent 12281 6bf23d89dc43
child 12283 d446dd280622
Change water speed range for better precision
hedgewars/uRender.pas
hedgewars/uVariables.pas
--- a/hedgewars/uRender.pas	Tue Apr 18 22:19:19 2017 +0200
+++ b/hedgewars/uRender.pas	Tue Apr 18 22:27:25 2017 +0200
@@ -1873,7 +1873,7 @@
 else
 	frame:= 0;
 
-TextureBuffer[3].X:= shift + ((LongInt((RealTicks * waterSpeed) shr 6) * Dir + dX) mod spriteWidth) / (spriteWidth - 1);
+TextureBuffer[3].X:= shift + ((LongInt((RealTicks * waterSpeed div 100) shr 6) * Dir + dX) mod spriteWidth) / (spriteWidth - 1);
 TextureBuffer[3].Y:= frame * realHeight;
 TextureBuffer[5].X:= TextureBuffer[3].X + nWaves;
 TextureBuffer[5].Y:= frame * realHeight;
--- a/hedgewars/uVariables.pas	Tue Apr 18 22:19:19 2017 +0200
+++ b/hedgewars/uVariables.pas	Tue Apr 18 22:27:25 2017 +0200
@@ -2798,7 +2798,7 @@
     vobFallSpeed:= 100;
     watFrames:= 1;
     watFrameTicks:= 0;
-    watMove:= 1;
+    watMove:= 100;
 
     vobSDFrameTicks:= 0;
     vobSDFramesCount:= 4;
@@ -2807,7 +2807,7 @@
     vobSDFallSpeed:= 250;
     watSDFrames:= 1;
     watSDFrameTicks:= 0;
-    watSDMove:= 1;
+    watSDMove:= 100;
 
 {$IFDEF MOBILE}
     cMinScreenWidth  := min(cScreenWidth, 480);