hedgewars/uGearsHedgehog.pas
changeset 12204 0a7d7256d3d8
parent 12194 ac9cf0cf40ee
child 12286 b4dde7035fe2
equal deleted inserted replaced
12203:668ee6e388bd 12204:0a7d7256d3d8
   324                                  PlaySound(sndSniperReload);
   324                                  PlaySound(sndSniperReload);
   325                                  newGear:= AddGear(hwRound(lx + xx * cHHRadius), hwRound(ly + yy * cHHRadius), gtSniperRifleShot, 0, xx * _0_5, yy * _0_5, 0);
   325                                  newGear:= AddGear(hwRound(lx + xx * cHHRadius), hwRound(ly + yy * cHHRadius), gtSniperRifleShot, 0, xx * _0_5, yy * _0_5, 0);
   326                                  end;
   326                                  end;
   327                      amDynamite: newGear:= AddGear(hwRound(lx) + hwSign(dX) * 7, hwRound(ly), gtDynamite, 0, SignAs(_0_03, dX), _0, 5000);
   327                      amDynamite: newGear:= AddGear(hwRound(lx) + hwSign(dX) * 7, hwRound(ly), gtDynamite, 0, SignAs(_0_03, dX), _0, 5000);
   328                          amDuck: begin
   328                          amDuck: begin
   329                                  PlaySound(sndDuckDrop);
   329                                  // Does duck spawn inside water?
       
   330                                  if (LeftX > hwRound(Gear^.X) - Gear^.Karma) or (RightX < hwRound(Gear^.X) + Gear^.Karma) or (cWaterLine < hwRound(Gear^.Y) + Gear^.Karma) then
       
   331                                      PlaySound(sndDroplet2)
       
   332                                  else
       
   333                                      // Duck spawned in air, normal drop sound
       
   334                                      PlaySound(sndDuckDrop);
   330                                  newGear:= AddGear(hwRound(lx), hwRound(ly), gtDuck, 0, _0, _0, 0);
   335                                  newGear:= AddGear(hwRound(lx), hwRound(ly), gtDuck, 0, _0, _0, 0);
   331                                  if not ((not dX.isNegative) xor ((State and gstHHHJump) <> 0)) then
   336                                  if not ((not dX.isNegative) xor ((State and gstHHHJump) <> 0)) then
   332                                      newGear^.Tag:= -1
   337                                      newGear^.Tag:= -1
   333                                  else
   338                                  else
   334                                      newGear^.Tag:= 1;
   339                                      newGear^.Tag:= 1;