Changeset 219 for trunk


Ignore:
Timestamp:
Jun 10, 2018, 12:04:34 PM (6 years ago)
Author:
chronos
Message:
  • Fixed: Not possible to continue playing after a game was loaded from file. Wrong assignment of TMap object.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UGame.pas

    r216 r219  
    13931393//  I: Integer;
    13941394begin
     1395  // Do not assign Game field
    13951396  MaxPower := Source.MaxPower;
    1396   Game := Source.Game;
    13971397  Size := Source.Size;
    13981398  DefaultCellSize := Source.DefaultCellSize;
     
    22162216  TotalCells := Source.TotalCells;
    22172217  TotalUnits := Source.TotalUnits;
     2218  TotalCities := Source.TotalCities;
     2219  TotalDiscovered := Source.TotalDiscovered;
     2220  TotalWinObjectiveCells := Source.TotalWinObjectiveCells;
    22182221  StartUnits := Source.StartUnits;
    22192222  StartCell := Source.StartCell;
     
    28092812    else Map := TMap.Create;
    28102813  end;
     2814  Map.Game := Self;
    28112815  Map.Assign(OldMap);
    28122816  FreeAndNil(OldMap);
     
    30853089        Players[I].PlayerMap.CheckVisibility;
    30863090      end;
    3087       Map.ComputePlayerStats;
     3091      ComputePlayerStats;
    30883092      Running := ReadBoolean(RootNode, 'Running', True);
    30893093    end;
Note: See TracChangeset for help on using the changeset viewer.