should probably fix broken flakes, my bad
authorHenek
Wed, 16 Mar 2011 22:45:42 +0100
changeset 5014 adc340265ccf
parent 5013 04789ba3f200
child 5015 1859a471488b
should probably fix broken flakes, my bad
hedgewars/uLandObjects.pas
hedgewars/uVisualGears.pas
--- a/hedgewars/uLandObjects.pas	Wed Mar 16 17:25:05 2011 +0100
+++ b/hedgewars/uLandObjects.pas	Wed Mar 16 22:45:42 2011 +0100
@@ -547,7 +547,6 @@
             vobVelocity:= StrToInt(Trim(Copy(s, 1, Pred(i))));
             Delete(s, 1, i);
             vobFallSpeed:= StrToInt(Trim(s));
-            vobCount:= vobCount * cScreenSpace div LAND_WIDTH;
             end;
         end
     else if key = 'sd-water-top' then
@@ -593,7 +592,6 @@
             vobSDVelocity:= StrToInt(Trim(Copy(s, 1, Pred(i))));
             Delete(s, 1, i);
             vobSDFallSpeed:= StrToInt(Trim(s));
-            vobSDCount:= vobSDCount * cScreenSpace div LAND_WIDTH;
             end;
         end
     else if key = 'rq-sky' then
--- a/hedgewars/uVisualGears.pas	Wed Mar 16 17:25:05 2011 +0100
+++ b/hedgewars/uVisualGears.pas	Wed Mar 16 22:45:42 2011 +0100
@@ -610,10 +610,10 @@
 if (cReducedQuality and rqKillFlakes) <> 0 then exit;
 
 if ((GameFlags and gfBorder) <> 0) or ((Theme <> 'Snow') and (Theme <> 'Christmas')) then
-    for i:= 0 to Pred(vobCount) do
+    for i:= 0 to Pred(vobCount * cScreenSpace div LAND_WIDTH) do
         AddVisualGear(cLeftScreenBorder + random(cScreenSpace), random(1024+200) - 100 + LAND_HEIGHT, vgtFlake)
 else
-    for i:= 0 to Pred(vobCount div 3) do
+    for i:= 0 to Pred((vobCount * cScreenSpace div LAND_WIDTH) div 3) do
         AddVisualGear(cLeftScreenBorder + random(cScreenSpace), random(1024+200) - 100 + LAND_HEIGHT, vgtFlake);
 end;
 
@@ -633,10 +633,10 @@
         end
     else vg:= vg^.NextGear;
 if ((GameFlags and gfBorder) <> 0) or ((Theme <> 'Snow') and (Theme <> 'Christmas')) then
-    for i:= 0 to Pred(vobSDCount) do
+    for i:= 0 to Pred(vobSDCount * cScreenSpace div LAND_WIDTH) do
         AddVisualGear(cLeftScreenBorder + random(cScreenSpace), random(1024+200) - 100 + LAND_HEIGHT, vgtFlake)
 else
-    for i:= 0 to Pred(vobSDCount div 3) do
+    for i:= 0 to Pred((vobSDCount * cScreenSpace div LAND_WIDTH) div 3) do
         AddVisualGear(cLeftScreenBorder + random(cScreenSpace), random(1024+200) - 100 + LAND_HEIGHT, vgtFlake);
 end;