hedgewars/GSHandlers.inc
changeset 511 2b5b9e00419d
parent 506 0889d833d47e
child 513 69e06d710d46
equal deleted inserted replaced
510:4e994e1b7abb 511:2b5b9e00419d
   474    HHGear^.State:= HHGear^.State and not gstAttacking;
   474    HHGear^.State:= HHGear^.State and not gstAttacking;
   475    HedgehogStep(HHGear);
   475    HedgehogStep(HHGear);
   476    HHGear^.State:= HHGear^.State or gstAttacking;
   476    HHGear^.State:= HHGear^.State or gstAttacking;
   477 
   477 
   478    inc(BTSteps);
   478    inc(BTSteps);
   479    if BTSteps = 11 then
   479    if BTSteps = 7 then
   480       begin
   480       begin
   481       BTSteps:= 0;
   481       BTSteps:= 0;
   482       Gear^.X:= HHGear^.X + Gear^.dX * cHHRadius * 2;
   482       Gear^.X:= HHGear^.X + Gear^.dX * (cHHRadius + cBlowTorchC);
   483       Gear^.Y:= HHGear^.Y + Gear^.dY * cHHRadius * 2;
   483       Gear^.Y:= HHGear^.Y + Gear^.dY * (cHHRadius + cBlowTorchC);
   484       HHGear^.State:= HHGear^.State or gstNoDamage;
   484       HHGear^.State:= HHGear^.State or gstNoDamage;
   485       AmmoShove(Gear, 3, 14);
   485       AmmoShove(Gear, 2, 14);
   486       HHGear^.State:= HHGear^.State and not gstNoDamage
   486       HHGear^.State:= HHGear^.State and not gstNoDamage
   487       end;
   487       end;
   488 
   488 
   489    if (HHGear^.State and gstFalling) <> 0 then Gear^.Timer:= 0
   489    if (HHGear^.State and gstFalling) <> 0 then Gear^.Timer:= 0
   490    end;
   490    end;
   819          else if Gear^.dY < - _0_03 then PlaySound(sndGraveImpact, false);
   819          else if Gear^.dY < - _0_03 then PlaySound(sndGraveImpact, false);
   820       end;
   820       end;
   821    CheckGearDrowning(Gear);
   821    CheckGearDrowning(Gear);
   822    end;
   822    end;
   823 
   823 
   824 if (Gear^.CollIndex = High(Longword)) and (Gear^.dY.QWordValue = 0) then AddGearCI(Gear)
   824 if (Gear^.dY.QWordValue = 0) then AddGearCI(Gear)
   825    else if (Gear^.CollIndex < High(Longword)) and (Gear^.dY.QWordValue <> 0) then DeleteCI(Gear);
   825    else if (Gear^.dY.QWordValue <> 0) then DeleteCI(Gear)
   826 end;
   826 end;
   827 
   827 
   828 ////////////////////////////////////////////////////////////////////////////////
   828 ////////////////////////////////////////////////////////////////////////////////
   829 var thexchar: array[0..5] of record
   829 var thexchar: array[0..5] of record
   830                              oy, ny: LongInt;
   830                              oy, ny: LongInt;