hedgewars/uGears.pas
changeset 4578 f3cf226fad16
parent 4492 e5554b06b68f
child 4602 ec84fb564bab
equal deleted inserted replaced
4576:d85062310790 4578:f3cf226fad16
   125             @doStepSMine,
   125             @doStepSMine,
   126             @doStepPoisonCloud,
   126             @doStepPoisonCloud,
   127             @doStepHammer,
   127             @doStepHammer,
   128             @doStepHammerHit,
   128             @doStepHammerHit,
   129             @doStepResurrector,
   129             @doStepResurrector,
   130             @doStepNapalmBomb
   130             @doStepNapalmBomb,
       
   131             @doStepSnowball
   131             );
   132             );
   132 
   133 
   133 procedure InsertGearToList(Gear: PGear);
   134 procedure InsertGearToList(Gear: PGear);
   134 var tmp, ptmp: PGear;
   135 var tmp, ptmp: PGear;
   135 begin
   136 begin
   243                     if gear^.Hedgehog^.BotLevel > 0 then
   244                     if gear^.Hedgehog^.BotLevel > 0 then
   244                         gear^.Hedgehog^.Effects[heResurrectable] := true;
   245                         gear^.Hedgehog^.Effects[heResurrectable] := true;
   245                 end;
   246                 end;
   246        gtShell: begin
   247        gtShell: begin
   247                 gear^.Radius:= 4;
   248                 gear^.Radius:= 4;
       
   249                 end;
       
   250        gtSnowball: begin
       
   251                 gear^.Radius:= 4;
       
   252                 gear^.Elasticity:= _1;
       
   253                 gear^.Friction:= _1;
   248                 end;
   254                 end;
   249        gtGrave: begin
   255        gtGrave: begin
   250                 gear^.ImpactSound:= sndGraveImpact;
   256                 gear^.ImpactSound:= sndGraveImpact;
   251                 gear^.nImpactSounds:= 1;
   257                 gear^.nImpactSounds:= 1;
   252                 gear^.Radius:= 10;
   258                 gear^.Radius:= 10;
  1243     tmpDmg:= ModifyDamage(Damage, Gear);
  1249     tmpDmg:= ModifyDamage(Damage, Gear);
  1244     if (Gear^.State and gstNoDamage) = 0 then
  1250     if (Gear^.State and gstNoDamage) = 0 then
  1245         begin
  1251         begin
  1246         
  1252         
  1247         if (Ammo^.Kind = gtDEagleShot) or (Ammo^.Kind = gtSniperRifleShot) then 
  1253         if (Ammo^.Kind = gtDEagleShot) or (Ammo^.Kind = gtSniperRifleShot) then 
  1248         begin
  1254             begin
  1249             VGear := AddVisualGear(hwround(Ammo^.X), hwround(Ammo^.Y), vgtBulletHit);
  1255             VGear := AddVisualGear(hwround(Ammo^.X), hwround(Ammo^.Y), vgtBulletHit);
  1250             if VGear <> nil then
  1256             if VGear <> nil then VGear^.Angle := DxDy2Angle(-Ammo^.dX, Ammo^.dY);
  1251             begin
  1257             end;
  1252                 VGear^.Angle := DxDy2Angle(-Ammo^.dX, Ammo^.dY);
       
  1253             end;
       
  1254         end;
       
  1255         
  1258         
  1256         if (Gear^.Kind = gtHedgehog) and (Ammo^.State and gsttmpFlag <> 0) and (Ammo^.Kind = gtShover) then Gear^.FlightTime:= 1;
  1259         if (Gear^.Kind = gtHedgehog) and (Ammo^.State and gsttmpFlag <> 0) and (Ammo^.Kind = gtShover) then Gear^.FlightTime:= 1;
  1257 
  1260 
  1258         case Gear^.Kind of
  1261         case Gear^.Kind of
  1259             gtHedgehog,
  1262             gtHedgehog,