hedgewars/uRender.pas
changeset 6710 42504695122d
parent 6700 e04da46ee43c
child 6982 8d41d22a291d
equal deleted inserted replaced
6708:314929f0a3e1 6710:42504695122d
   468     with moveAnim do
   468     with moveAnim do
   469         if animate then
   469         if animate then
   470             if RealTicks > (startTime + MOVE_ANIM_TIME) then
   470             if RealTicks > (startTime + MOVE_ANIM_TIME) then
   471                 begin
   471                 begin
   472                 startTime:= 0;
   472                 startTime:= 0;
       
   473                 animate:= false;
   473                 frame.x:= target.x;
   474                 frame.x:= target.x;
   474                 frame.y:= target.y;
   475                 frame.y:= target.y;
       
   476                 active.x:= active.x + (target.x - source.x);
       
   477                 active.y:= active.y + (target.y - source.y);
   475                 end
   478                 end
   476             else
   479             else
   477                 begin
   480                 begin
   478                 frame.x:= source.x + Round((target.x - source.x) * ((RealTicks - startTime) / MOVE_ANIM_TIME));
   481                 frame.x:= source.x + Round((target.x - source.x) * ((RealTicks - startTime) / MOVE_ANIM_TIME));
   479                 frame.y:= source.y + Round((target.y - source.y) * ((RealTicks - startTime) / MOVE_ANIM_TIME));
   482                 frame.y:= source.y + Round((target.y - source.y) * ((RealTicks - startTime) / MOVE_ANIM_TIME));