Changeset 307 for trunk/UMap.pas


Ignore:
Timestamp:
Aug 18, 2021, 11:18:39 AM (3 years ago)
Author:
chronos
Message:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UMap.pas

    r299 r307  
    6363    function GetColor: TColor;
    6464    function ToString: ansistring; override;
     65    procedure CheckOwnership;
    6566    constructor Create;
    6667    destructor Destroy; override;
     
    11191120end;
    11201121
     1122procedure TCell.CheckOwnership;
     1123begin
     1124  if TGame(Map.Game).GameSystem.EmptyCellsNeutral then
     1125  if Assigned(Player) and  (Assigned(OneUnit) and (OneUnit.Power = 0)) or
     1126    not Assigned(OneUnit) then
     1127      Player := nil;
     1128end;
     1129
    11211130constructor TCell.Create;
    11221131begin
Note: See TracChangeset for help on using the changeset viewer.