hedgewars/uVisualGearsHandlers.pas
changeset 9762 938d1c08d0d1
parent 9761 b497a6c679cb
child 9763 be63ead5085e
equal deleted inserted replaced
9761:b497a6c679cb 9762:938d1c08d0d1
   588 
   588 
   589 if (Gear^.Hedgehog^.Gear <> nil) then
   589 if (Gear^.Hedgehog^.Gear <> nil) then
   590     begin
   590     begin
   591     Gear^.X:= hwFloat2Float(Gear^.Hedgehog^.Gear^.X) + (Gear^.Tex^.w div 2  - Gear^.FrameTicks);
   591     Gear^.X:= hwFloat2Float(Gear^.Hedgehog^.Gear^.X) + (Gear^.Tex^.w div 2  - Gear^.FrameTicks);
   592     Gear^.Y:= hwFloat2Float(Gear^.Hedgehog^.Gear^.Y) - (16 + Gear^.Tex^.h);
   592     Gear^.Y:= hwFloat2Float(Gear^.Hedgehog^.Gear^.Y) - (16 + Gear^.Tex^.h);
       
   593     Gear^.X:= max(((-cScreenWidth + 16) / zoom) + Gear^.Tex^.w div 2, min(((cScreenWidth - 16) / zoom) - Gear^.Tex^.w div 2, Gear^.X + WorldDx));
       
   594     Gear^.Y:= max(cScreenHeight div 2 - ((cScreenHeight - 16) / (zoom)), min(cScreenHeight div 2 - ((-cScreenHeight + Gear^.Tex^.h) / (zoom)) - 64, Gear^.Y + WorldDy));
   593     end;
   595     end;
   594 
   596 
   595 if Gear^.Timer = 0 then
   597 if Gear^.Timer = 0 then
   596     begin
   598     begin
   597     if Gear^.Hedgehog^.SpeechGear = Gear then
   599     if Gear^.Hedgehog^.SpeechGear = Gear then