hedgewars/GSHandlers.inc
changeset 3081 27170e35d9ef
parent 3080 b7fa8ad60e3b
child 3092 dfeb6fc771f7
equal deleted inserted replaced
3080:b7fa8ad60e3b 3081:27170e35d9ef
  2743     fuel: LongInt;
  2743     fuel: LongInt;
  2744     move: hwFloat;
  2744     move: hwFloat;
  2745 begin
  2745 begin
  2746 HHGear:= CurrentHedgehog^.Gear;
  2746 HHGear:= CurrentHedgehog^.Gear;
  2747 
  2747 
  2748 move:= _0_1 * _0_5;
  2748 move:= _0_1;
  2749 fuel:= 50;
  2749 fuel:= 50;
  2750 
  2750 
  2751 if Gear^.Pos > 0 then
  2751 if Gear^.Pos > 0 then
  2752     dec(Gear^.Pos, 1)
  2752     dec(Gear^.Pos, 1)
  2753 else if (HHGear^.Message and (gm_Left or gm_Right or gm_Up)) <> 0 then
  2753 else if (HHGear^.Message and (gm_Left or gm_Right or gm_Up)) <> 0 then
  2767     Gear^.MsgParam:= Gear^.MsgParam or gm_Up;
  2767     Gear^.MsgParam:= Gear^.MsgParam or gm_Up;
  2768     end;
  2768     end;
  2769 if (HHGear^.Message and gm_Left) <> 0 then move.isNegative:= true;
  2769 if (HHGear^.Message and gm_Left) <> 0 then move.isNegative:= true;
  2770 if (HHGear^.Message and (gm_Left or gm_Right)) <> 0 then
  2770 if (HHGear^.Message and (gm_Left or gm_Right)) <> 0 then
  2771     begin
  2771     begin
  2772     HHGear^.dX:= HHGear^.dX + (move * _0_5);
  2772     HHGear^.dX:= HHGear^.dX + (move * _0_2);
  2773     dec(Gear^.Health, fuel div 5);
  2773     dec(Gear^.Health, fuel div 5);
  2774     Gear^.MsgParam:= Gear^.MsgParam or (HHGear^.Message and (gm_Left or gm_Right));
  2774     Gear^.MsgParam:= Gear^.MsgParam or (HHGear^.Message and (gm_Left or gm_Right));
  2775     end;
  2775     end;
  2776 
  2776 
  2777 if Gear^.Health < 0 then Gear^.Health:= 0;
  2777 if Gear^.Health < 0 then Gear^.Health:= 0;