hedgewars/uGearsHandlersMess.pas
changeset 11556 aefc770feb65
parent 11555 881231c1ba46
child 11557 9188505653d5
equal deleted inserted replaced
11555:881231c1ba46 11556:aefc770feb65
  4364 
  4364 
  4365             if (hwRound(Distance(Gear^.X-ox,Gear^.Y-oy)) > Gear^.Radius + 1 ) then
  4365             if (hwRound(Distance(Gear^.X-ox,Gear^.Y-oy)) > Gear^.Radius + 1 ) then
  4366                 continue;
  4366                 continue;
  4367             end;
  4367             end;
  4368 
  4368 
  4369         if isbullet then
  4369         if (iterator^.Kind = gtDEagleShot) or (iterator^.Kind = gtSniperRifleShot) then
  4370             begin
  4370             begin
  4371             // draw bullet trail
  4371             // draw bullet trail
  4372             spawnBulletTrail(iterator);
  4372             spawnBulletTrail(iterator);
  4373             // the bullet can now hurt the hog that fired it
  4373             // the bullet can now hurt the hog that fired it
  4374             iterator^.Data:= nil;
  4374             iterator^.Data:= nil;
  5017 var
  5017 var
  5018     HHGear: PGear;
  5018     HHGear: PGear;
  5019 begin
  5019 begin
  5020     PlaySound(sndSineGun);
  5020     PlaySound(sndSineGun);
  5021 
  5021 
  5022     // push the shooting Hedgehog back
  5022     if (Gear^.Hedgehog <> nil) and (Gear^.Hedgehog^.Gear <> nil) then
  5023     HHGear := CurrentHedgehog^.Gear;
  5023         begin
  5024     Gear^.dX.isNegative := not Gear^.dX.isNegative;
  5024         HHGear := Gear^.Hedgehog^.Gear;
  5025     Gear^.dY.isNegative := not Gear^.dY.isNegative;
  5025         // push the shooting Hedgehog back
  5026     HHGear^.dX := Gear^.dX;
  5026         Gear^.dX.isNegative := not Gear^.dX.isNegative;
  5027     HHGear^.dY := Gear^.dY;
  5027         Gear^.dY.isNegative := not Gear^.dY.isNegative;
  5028     AmmoShove(Gear, 0, 80);
  5028         HHGear^.dX := Gear^.dX;
  5029     Gear^.dX.isNegative := not Gear^.dX.isNegative;
  5029         HHGear^.dY := Gear^.dY;
  5030     Gear^.dY.isNegative := not Gear^.dY.isNegative;
  5030         AmmoShove(Gear, 0, 80);
       
  5031         Gear^.dX.isNegative := not Gear^.dX.isNegative;
       
  5032         Gear^.dY.isNegative := not Gear^.dY.isNegative;
       
  5033         end;
  5031 
  5034 
  5032     Gear^.doStep := @doStepSineGunShotWork;
  5035     Gear^.doStep := @doStepSineGunShotWork;
  5033     {$IFNDEF PAS2C}
  5036     {$IFNDEF PAS2C}
  5034     with mobileRecord do
  5037     with mobileRecord do
  5035         if (performRumble <> nil) and (not fastUntilLag) then
  5038         if (performRumble <> nil) and (not fastUntilLag) then