Changeset 401 for tags/1.4.0/Map.pas


Ignore:
Timestamp:
Jan 6, 2025, 11:12:12 AM (3 days ago)
Author:
chronos
Message:

Merged revision(s) 396-400 from trunk:

  • Fixed: Charts form chart was not drawn on the initial show.
  • Fixed: Run Randomize only once at startup.
  • Fixed: Store current state of RandSeed to game save.
  • Fixed: Load/store RandSeed as its Cardinal type instead of Integer.
  • Modified: Maximum number of player set to 12.
  • Fixed: Standard yellow color is too bright and not readable with white text. Used darker yellow instead.
  • Fixed: Integrity checks for id references loaded from game file.
  • Fixed: Wrong players and units id recalculation during game save causing bad references.
  • Modified: Set new created players as computer.
  • Fixed: Scale charts line width.
  • Fixed: Item form made bigger to avoid showing scrollbars.
  • Fixed: Item form string control made shorter.
Location:
tags/1.4.0
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tags/1.4.0

  • tags/1.4.0/Map.pas

    r376 r401  
    10581058  Cell: TCell;
    10591059begin
    1060   Player := TGame(Map.Game).Players.FindById(PlayerId);
    1061   OneUnit := TGame(Map.Game).Units.FindById(OneUnitId);
     1060  if PlayerId <> 0 then begin
     1061    Player := TGame(Map.Game).Players.FindById(PlayerId);
     1062    if not Assigned(Player) then
     1063      raise Exception.Create('Referenced player id ' + IntToStr(PlayerId) + ' not found.');
     1064  end else Player := nil;
     1065
     1066  if OneUnitId <> 0 then begin
     1067    OneUnit := TGame(Map.Game).Units.FindById(OneUnitId);
     1068    if not Assigned(OneUnit) then
     1069      raise Exception.Create('Referenced unit id ' + IntToStr(OneUnitId) + ' not found.');
     1070  end else OneUnit := nil;
    10621071
    10631072  Neighbors.Count := Length(NeighborsId);
Note: See TracChangeset for help on using the changeset viewer.