diff --git a/Client/UfrmMain.pas b/Client/UfrmMain.pas index b70cc57..f67afa3 100644 --- a/Client/UfrmMain.pas +++ b/Client/UfrmMain.pas @@ -2728,6 +2728,7 @@ var intensity, red, green, blue: GLfloat; blockInfo: PBlockInfo; item: TWorldItem; + lightMode: Integer; begin if not (sbsValid in FScreenBufferState) then RebuildScreenBuffer; @@ -2742,6 +2743,7 @@ begin UpdateFilter; blockInfo := nil; + lightMode := -1; while FScreenBuffer.Iterate(blockInfo) do begin if blockInfo^.State = ssFiltered then @@ -2752,11 +2754,19 @@ begin if acSelect.Checked or item.CanBeEdited or (item is TVirtualTile) then begin intensity := 1.0; - SetNormalLights; + if lightMode <> 0 then + begin + SetNormalLights; + lightMode := 0; + end; end else begin intensity := 0.5; - SetDarkLights; + if lightMode <> 1 then + begin + SetDarkLights; + lightMode := 1; + end; end; case blockInfo^.WalkRestriction of