hedgewars/uGears.pas
changeset 5706 4454aa0523e7
parent 5695 f1015857deb8
child 5708 8972de340fa1
equal deleted inserted replaced
5704:718f98a9df12 5706:4454aa0523e7
    73 function  CheckGearNear(Gear: PGear; Kind: TGearType; rX, rY: LongInt): PGear; forward;
    73 function  CheckGearNear(Gear: PGear; Kind: TGearType; rX, rY: LongInt): PGear; forward;
    74 procedure SpawnBoxOfSmth; forward;
    74 procedure SpawnBoxOfSmth; forward;
    75 procedure AfterAttack; forward;
    75 procedure AfterAttack; forward;
    76 procedure HedgehogStep(Gear: PGear); forward;
    76 procedure HedgehogStep(Gear: PGear); forward;
    77 procedure doStepHedgehogMoving(Gear: PGear); forward;
    77 procedure doStepHedgehogMoving(Gear: PGear); forward;
    78 procedure doStepHedgehogReturn(Gear: PGear); forward;
       
    79 procedure HedgehogChAngle(HHGear: PGear); forward;
    78 procedure HedgehogChAngle(HHGear: PGear); forward;
    80 procedure ShotgunShot(Gear: PGear); forward;
    79 procedure ShotgunShot(Gear: PGear); forward;
    81 procedure PickUp(HH, Gear: PGear); forward;
    80 procedure PickUp(HH, Gear: PGear); forward;
    82 procedure HHSetWeapon(HHGear: PGear); forward;
    81 procedure HHSetWeapon(HHGear: PGear); forward;
    83 procedure doStepCase(Gear: PGear); forward;
    82 procedure doStepCase(Gear: PGear); forward;
   426                 gear^.nImpactSounds:= 1;
   425                 gear^.nImpactSounds:= 1;
   427                 gear^.Radius:= 10;
   426                 gear^.Radius:= 10;
   428                 gear^.Elasticity:= _0_3;
   427                 gear^.Elasticity:= _0_3;
   429                 gear^.Timer:= 0
   428                 gear^.Timer:= 0
   430                 end;
   429                 end;
       
   430       gtTardis: begin
       
   431                 gear^.Timer:= 0;
       
   432                 gear^.Pos:= 1;
       
   433                 gear^.Z:= cCurrHHZ+1;
       
   434                 end;
   431       gtMortar: begin
   435       gtMortar: begin
   432                 gear^.Radius:= 4;
   436                 gear^.Radius:= 4;
   433                 gear^.Elasticity:= _0_2;
   437                 gear^.Elasticity:= _0_2;
   434                 gear^.Friction:= _0_08;
   438                 gear^.Friction:= _0_08;
   435                 gear^.Density:= _1;
   439                 gear^.Density:= _1;
  1448                     if (Ammo^.Kind = gtDrill) then begin Ammo^.Timer:= 0; exit; end;
  1452                     if (Ammo^.Kind = gtDrill) then begin Ammo^.Timer:= 0; exit; end;
  1449                     if (not Gear^.Invulnerable) then
  1453                     if (not Gear^.Invulnerable) then
  1450                         ApplyDamage(Gear, Ammo^.Hedgehog, tmpDmg, dsShove)
  1454                         ApplyDamage(Gear, Ammo^.Hedgehog, tmpDmg, dsShove)
  1451                     else
  1455                     else
  1452                         Gear^.State:= Gear^.State or gstWinner;
  1456                         Gear^.State:= Gear^.State or gstWinner;
  1453                     if (Gear^.Kind = gtExplosives) and (Ammo^.Kind = gtBlowtorch) then ApplyDamage(Gear, Ammo^.Hedgehog, tmpDmg * 100, dsUnknown); // crank up damage for explosives + blowtorch
  1457                     if (Gear^.Kind = gtExplosives) and (Ammo^.Kind = gtBlowtorch) then 
       
  1458                         begin
       
  1459                         if (Ammo^.Hedgehog^.Gear <> nil) then Ammo^.Hedgehog^.Gear^.State:= Ammo^.Hedgehog^.Gear^.State and not gstNotKickable;
       
  1460                         ApplyDamage(Gear, Ammo^.Hedgehog, tmpDmg * 100, dsUnknown); // crank up damage for explosives + blowtorch
       
  1461                         end;
  1454 
  1462 
  1455                     DeleteCI(Gear);
  1463                     DeleteCI(Gear);
  1456                     if (Gear^.Kind = gtHedgehog) and Gear^.Hedgehog^.King then
  1464                     if (Gear^.Kind = gtHedgehog) and Gear^.Hedgehog^.King then
  1457                         begin
  1465                         begin
  1458                         Gear^.dX:= Ammo^.dX * Power * _0_005;
  1466                         Gear^.dX:= Ammo^.dX * Power * _0_005;