Ignore:
Timestamp:
Jan 7, 2024, 10:24:51 PM (4 months ago)
Author:
chronos
Message:
  • Modified: Code cleanup.
  • Added: High DPI aware SetWindowPos function.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocalPlayer/ClientTools.pas

    r486 r522  
    100100  Inc(Loc0, G.lx * 1024);
    101101  Inc(Loc1, G.lx * 1024);
    102   dx := abs(((Loc1 mod G.lx * 2 + Loc1 div G.lx and 1) -
     102  dx := Abs(((Loc1 mod G.lx * 2 + Loc1 div G.lx and 1) -
    103103    (Loc0 mod G.lx * 2 + Loc0 div G.lx and 1) + 3 * G.lx) mod (2 * G.lx) - G.lx);
    104   dy := abs(Loc1 div G.lx - Loc0 div G.lx);
    105   Result := dx + dy + abs(dx - dy) shr 1;
     104  dy := Abs(Loc1 div G.lx - Loc0 div G.lx);
     105  Result := dx + dy + Abs(dx - dy) shr 1;
    106106end;
    107107
     
    371371      for dx := -2 to 2 do
    372372        for dy := -2 to 2 do
    373           if abs(dx) + abs(dy) = 2 then
     373          if Abs(dx) + Abs(dy) = 2 then
    374374            if Server(sMoveUnit - sExecute + dx and 7 shl 4 + dy and
    375375              7 shl 7, Me, uix, nil^) >= rExecuted then
Note: See TracChangeset for help on using the changeset viewer.