Changeset 316 for trunk/UGame.pas


Ignore:
Timestamp:
Jun 19, 2024, 11:53:06 PM (5 months ago)
Author:
chronos
Message:
  • Modified: Code cleanup.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UGame.pas

    r315 r316  
    11unit UGame;
    2 
    3 {$mode delphi}{$H+}
    42
    53interface
     
    75uses
    86  Classes, SysUtils, ExtCtrls, Graphics, XMLConf, XMLRead, XMLWrite, Forms,
    9   DOM, Math, LazFileUtils, XML, Dialogs, LCLType, LCLIntf, fgl, UBuilding,
    10   UGeometry, UPlayer, UMap, UMapType, UUnit, UGameSystem;
     7  DOM, Math, LazFileUtils, XML, Dialogs, LCLType, LCLIntf, UBuilding, UGeometry,
     8  UPlayer, UMap, UMapType, UUnit, UGameSystem;
    119
    1210const
     
    387385    List := TCells.Create;
    388386    try
    389       List.FreeObjects := False;
     387      List.OwnsObjects := False;
    390388      Map.Cells.GetCellsWithWeight(List, Round(LongestDistance * 0.6), Round(LongestDistance * 0.8));
    391389
     
    415413      Player.StartCell.Mark := True;
    416414      List := TCells.Create;
    417       List.FreeObjects := False;
     415      List.OwnsObjects := False;
    418416      List.Add(Player.StartCell);
    419417      PropagatePlayerDistance(List);
     
    430428begin
    431429  NeighborList := TCells.Create;
    432   NeighborList.FreeObjects := False;
     430  NeighborList.OwnsObjects := False;
    433431
    434432  for Cell in List do begin
     
    880878  FreeAndNil(Units);
    881879  FreeAndNil(GameSystem);
    882   inherited Destroy;
     880  inherited;
    883881end;
    884882
Note: See TracChangeset for help on using the changeset viewer.