# HG changeset patch # User sheepluva # Date 1402414472 -7200 # Node ID 1155384a4e31deee68c3f4ce9185da49899a7f24 # Parent 237b403f92beaf54f943c5298afcc72aad8394e2 " could also refuse to update textures when land changes if the tile isn't visible" You had me at "refuse" <3 diff -r 237b403f92be -r 1155384a4e31 hedgewars/uLandTexture.pas --- a/hedgewars/uLandTexture.pas Tue Jun 10 13:26:58 2014 +0200 +++ b/hedgewars/uLandTexture.pas Tue Jun 10 17:34:32 2014 +0200 @@ -92,7 +92,7 @@ end end; -procedure RealLandTexUpdate; +procedure RealLandTexUpdate(x1, x2, y1, y2: LongInt); var x, y, ty, tx, lx, ly : LongWord; isEmpty: boolean; begin @@ -109,8 +109,8 @@ end else *) - for x:= 0 to LANDTEXARW -1 do - for y:= 0 to LANDTEXARH - 1 do + for x:= x1 to x2 do + for y:= y1 to y2 do with LandTextures[x, y] do if shouldUpdate then begin @@ -177,8 +177,6 @@ tScale: GLfloat; overlap: boolean; begin -RealLandTexUpdate; - // init values based on quality settings if (cReducedQuality and rqBlurryLand) <> 0 then begin @@ -226,6 +224,8 @@ if (fy > ly) then exit; +RealLandTexUpdate(fx, lx, fy, ly); + tX:= dX + tsize * fx; // loop through columns