Changeset 119 for trunk/UEngine.pas


Ignore:
Timestamp:
Oct 25, 2022, 11:02:30 PM (19 months ago)
Author:
chronos
Message:
  • Fixed: Error if track removed while train in station.
  • Fixed: Fullscreen was not working at the application first start.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UEngine.pas

    r118 r119  
    697697  // Remove track points from trains
    698698  for I := 0 to Trains.Count - 1 do
    699   with Trains[I] do begin
     699  with TMetroTrain(Trains[I]) do begin
    700700    IsOnTrack := False;
    701701    for J := Track.Points.IndexOf(TP1) to Track.Points.IndexOf(TP2) do
     
    15451545        LastTrainMoveTime := Time;
    15461546        Redraw;
    1547         TrackPosition.Move(PosChange);
     1547        if Assigned(TrackPosition.BaseTrackPoint) then
     1548          TrackPosition.Move(PosChange);
    15481549
    15491550        if Assigned(TargetStation) then begin
     
    18851886  with TPersistentForm.Create(nil) do
    18861887  try
     1888    Form := FormMain;
    18871889    SetFullScreen(FormMain.FullScreen);
    18881890  finally
Note: See TracChangeset for help on using the changeset viewer.