hedgewars/HHHandlers.inc
changeset 5197 9fa96377a69c
parent 5137 b6140f35735f
child 5279 66969e7494c5
equal deleted inserted replaced
5196:04ce9666a692 5197:9fa96377a69c
   315                         CurAmmoGear^.SoundChannel := LoopSound(sndResurrector);
   315                         CurAmmoGear^.SoundChannel := LoopSound(sndResurrector);
   316                     end;
   316                     end;
   317                    amDrillStrike: AddGear(CurWeapon^.Pos, 0, gtAirAttack, 3, _0, _0, CurWeapon^.Timer);
   317                    amDrillStrike: AddGear(CurWeapon^.Pos, 0, gtAirAttack, 3, _0, _0, CurWeapon^.Timer);
   318                    //amMelonStrike: AddGear(CurWeapon^.Pos, 0, gtAirAttack, 4, _0, _0, 0);
   318                    //amMelonStrike: AddGear(CurWeapon^.Pos, 0, gtAirAttack, 4, _0, _0, 0);
   319                      amStructure: CurAmmoGear:= AddGear(hwRound(X), hwRound(Y), gtStructure, 0, _0, _0, 0);
   319                      amStructure: CurAmmoGear:= AddGear(hwRound(X), hwRound(Y), gtStructure, 0, _0, _0, 0);
       
   320                         amTardis: CurAmmoGear:= AddGear(hwRound(X), hwRound(Y), gtTardis, 0, _0, _0, 5000);
   320                   end;
   321                   end;
   321 
   322 
   322         // Clear FollowGear if using on a rope/parachute/saucer etc so focus stays with the hog's movement
   323         // Clear FollowGear if using on a rope/parachute/saucer etc so focus stays with the hog's movement
   323         if altUse then FollowGear:= nil;
   324         if altUse then FollowGear:= nil;
   324 
   325 
   994     with Gear^.Hedgehog^ do
   995     with Gear^.Hedgehog^ do
   995         if Team^.hasGone then TeamGoneEffect(Team^);
   996         if Team^.hasGone then TeamGoneEffect(Team^);
   996     doStepHedgehogDriven(Gear)
   997     doStepHedgehogDriven(Gear)
   997     end;
   998     end;
   998 end;
   999 end;
       
  1000 
       
  1001 procedure doStepHedgehogReturn(Gear: PGear);
       
  1002 begin
       
  1003 if (Gear^.Timer > 0) and ((GameTicks mod 20) = 0) then dec(Gear^.Timer)
       
  1004 else if (Gear^.Timer = 0) then
       
  1005     begin
       
  1006     Gear^.doStep:= @doStepHedgehog;
       
  1007     Gear^.State:= Gear^.State and not gstTmpFlag;
       
  1008     end
       
  1009 end;