# HG changeset patch # User nemo # Date 1315963513 14400 # Node ID 212d3b4596584b095cb2500cdc81fd0e2ba85c02 # Parent 86c59c34cdd5ae23682cdc06b45d476eff721980 smoothing should be after despeckling diff -r 86c59c34cdd5 -r 212d3b459658 hedgewars/uLandGraphics.pas --- a/hedgewars/uLandGraphics.pas Wed Sep 14 00:06:26 2011 +0200 +++ b/hedgewars/uLandGraphics.pas Tue Sep 13 21:25:13 2011 -0400 @@ -832,16 +832,6 @@ begin bRes:= false; reCheck:= true; -for y:= 0 to LAND_HEIGHT div 32 - 1 do - for x:= 0 to LAND_WIDTH div 32 - 1 do - if LandDirty[y, x] <> 0 then - begin - ty:= y * 32; - tx:= x * 32; - for yy:= ty to ty + 31 do - for xx:= tx to tx + 31 do - Smooth(xx,yy) - end; while recheck do begin @@ -850,7 +840,7 @@ begin for x:= 0 to LAND_WIDTH div 32 - 1 do begin - if LandDirty[y, x] <> 0 then + if LandDirty[y, x] = 1 then begin updateBlock:= false; resweep:= true; @@ -889,12 +879,24 @@ end; end; if updateBlock then UpdateLandTexture(tx, 32, ty, 32); - LandDirty[y, x]:= 0; + LandDirty[y, x]:= 2; end; end; end; end; +for y:= 0 to LAND_HEIGHT div 32 - 1 do + for x:= 0 to LAND_WIDTH div 32 - 1 do + if LandDirty[y, x] <> 0 then + begin + LandDirty[y, x]:= 0; + ty:= y * 32; + tx:= x * 32; + for yy:= ty to ty + 31 do + for xx:= tx to tx + 31 do + Smooth(xx,yy) + end; + SweepDirty:= bRes; end;