Changeset 220 for trunk/UGame.pas


Ignore:
Timestamp:
Jun 10, 2018, 12:18:28 PM (6 years ago)
Author:
chronos
Message:
  • Added: Allow to toggle Fog of war in debug mode from Debug menu.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UGame.pas

    r219 r220  
    207207    CellLinks: TCellLinks;
    208208    Areas: TMapAreas;
     209    Cyclic: Boolean;
    209210    function IsOutsideShape(Coord: TPoint): Boolean; virtual;
    210211    function IsCellsNeighbor(Cell1, Cell2: TCell): Boolean; virtual;
     
    946947        else Pen.Width := 1;
    947948      Angle := ArcTan((PosTo.Y - PosFrom.Y) / (PosTo.X - PosFrom.X));
     949      if (Angle > +Pi) or (Angle < -Pi) then
     950        raise Exception.Create('Wrong arrow angle ' + FloatToStr(Angle));
     951
    948952      if Sign(PosTo.X - PosFrom.X) = -1 then Angle := Angle + Pi;
    949953      ArrowCenter := View.CellToCanvasPos(TPoint.Create(Trunc(PosFrom.X + (PosTo.X - PosFrom.X) / 2),
     
    32463250    for I := 0 to Cells.Count - 1 do begin
    32473251      if I = 0 then Player := Cells[I].Player;
    3248       if not Assigned(Cells[I].Player) or (Cells[I].Player <> Player) then begin
     3252      if not Assigned(Cells[I].Player) then begin
     3253        R := False;
     3254        Break;
     3255      end;
     3256      if (Cells[I].Player <> Player) then begin
    32493257        R := False;
    32503258        Break;
Note: See TracChangeset for help on using the changeset viewer.