Ignore:
Timestamp:
May 14, 2020, 9:31:00 PM (4 years ago)
Author:
chronos
Message:
  • Fixed: Wrong timeout calculation in movie mode.
  • Fixed: City dialog sound index out of range.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocalPlayer/Term.pas

    r220 r227  
    60806080      NoMap.PaintUnit(xMoving - xMin, yMoving - yMin, UnitInfo, 0);
    60816081      PaintBufferToScreen(xMin, yMin, xRange, yRange);
     6082      {$IFDEF LINUX}
     6083      // TODO: Force animation under linux
     6084      Application.ProcessMessages;
     6085      {$ENDIF}
    60826086
    60836087      SliceCount := 0;
     
    60856089      repeat
    60866090        if (SliceCount = 0) or
    6087           (MillisecondOf(Ticks - Ticks0) * 12 * (SliceCount + 1) div SliceCount
     6091          (Round(((Ticks - Ticks0) * 12) / OneMillisecond) * (SliceCount + 1) div SliceCount
    60886092          < MoveTime) then
    60896093        begin
    60906094          if not idle or (GameMode = cMovie) then
    60916095            Application.ProcessMessages;
    6092           {$IFDEF LINUX}
    6093           // TODO: Force animation under linux
    6094           Application.ProcessMessages;
    6095           {$ENDIF}
    60966096          Sleep(1);
    60976097          inc(SliceCount)
    60986098        end;
    60996099        Ticks := NowPrecise;
    6100       until (Ticks - Ticks0) / OneMillisecond * 12 >= MoveTime;
     6100      until (((Ticks - Ticks0) * 12) / OneMillisecond) >= MoveTime;
    61016101      Ticks0 := Ticks
    61026102    end;
     
    65396539          time1 := NowPrecise;
    65406540          SimpleMessage(Format('Map repaint time: %.3f ms',
    6541             [MillisecondOf(time1 - time0)]));
     6541            [(time1 - time0) / OneMillisecond]));
    65426542        end
    65436543    end
Note: See TracChangeset for help on using the changeset viewer.