hedgewars/uGearsList.pas
changeset 7730 2013733f9ca9
parent 7726 1137406bce12
child 7733 a1476c09403f
equal deleted inserted replaced
7729:c374746bb56e 7730:2013733f9ca9
   102 gear^.SoundChannel:= -1;
   102 gear^.SoundChannel:= -1;
   103 gear^.ImpactSound:= sndNone;
   103 gear^.ImpactSound:= sndNone;
   104 gear^.Density:= _1;
   104 gear^.Density:= _1;
   105 // Define ammo association, if any.
   105 // Define ammo association, if any.
   106 gear^.AmmoType:= GearKindAmmoTypeMap[Kind];
   106 gear^.AmmoType:= GearKindAmmoTypeMap[Kind];
       
   107 gear^.CollisionMask:= $FFFF;
   107 
   108 
   108 if CurrentHedgehog <> nil then 
   109 if CurrentHedgehog <> nil then 
   109     begin
   110     begin
   110     gear^.Hedgehog:= CurrentHedgehog;
   111     gear^.Hedgehog:= CurrentHedgehog;
   111     if (CurrentHedgehog^.Gear <> nil) and (hwRound(CurrentHedgehog^.Gear^.X) = X) and (hwRound(CurrentHedgehog^.Gear^.Y) = Y) then
   112     if (CurrentHedgehog^.Gear <> nil) and (hwRound(CurrentHedgehog^.Gear^.X) = X) and (hwRound(CurrentHedgehog^.Gear^.Y) = Y) then
   112         gear^.CollisionMask:= $FF7F;
   113         gear^.CollisionMask:= $FF7F
   113     end
   114     end;
   114 else gear^.CollisionMask:= $FFFF;
       
   115 
   115 
   116 if (Ammoz[Gear^.AmmoType].Ammo.Propz and ammoprop_NeedTarget <> 0) then
   116 if (Ammoz[Gear^.AmmoType].Ammo.Propz and ammoprop_NeedTarget <> 0) then
   117     gear^.Z:= cHHZ+1
   117     gear^.Z:= cHHZ+1
   118 else gear^.Z:= cUsualZ;
   118 else gear^.Z:= cUsualZ;
   119 
   119 
   248                 gear^.Elasticity:= _0_55;
   248                 gear^.Elasticity:= _0_55;
   249                 gear^.Friction:= _0_995;
   249                 gear^.Friction:= _0_995;
   250                 gear^.Density:= _1_6;
   250                 gear^.Density:= _1_6;
   251                 gear^.Timer:= 500;
   251                 gear^.Timer:= 500;
   252                 end;
   252                 end;
       
   253        gtKnife: gear^.Radius:= 5;
   253         gtCase: begin
   254         gtCase: begin
   254                 gear^.ImpactSound:= sndGraveImpact;
   255                 gear^.ImpactSound:= sndGraveImpact;
   255                 gear^.nImpactSounds:= 1;
   256                 gear^.nImpactSounds:= 1;
   256                 gear^.Radius:= 16;
   257                 gear^.Radius:= 16;
   257                 gear^.Elasticity:= _0_3;
   258                 gear^.Elasticity:= _0_3;