hedgewars/uGears.pas
changeset 3382 633046fa040c
parent 3381 f8800c44b3de
child 3384 7eb4707d43f0
equal deleted inserted replaced
3381:f8800c44b3de 3382:633046fa040c
   183             @doStepBirdy,
   183             @doStepBirdy,
   184             @doStepBigExplosion,
   184             @doStepBigExplosion,
   185             @doStepEggWork,
   185             @doStepEggWork,
   186             @doStepPortal,
   186             @doStepPortal,
   187             @doStepPortalGun,
   187             @doStepPortalGun,
   188             @doStepPiano
   188             @doStepPiano,
       
   189             @doStepBomb
   189             );
   190             );
   190 
   191 
   191 procedure InsertGearToList(Gear: PGear);
   192 procedure InsertGearToList(Gear: PGear);
   192 var tmp, ptmp: PGear;
   193 var tmp, ptmp: PGear;
   193 begin
   194 begin
   255     gear^.Hedgehog:= CurrentHedgehog;
   256     gear^.Hedgehog:= CurrentHedgehog;
   256     gear^.IntersectGear:= CurrentHedgehog^.Gear
   257     gear^.IntersectGear:= CurrentHedgehog^.Gear
   257     end;
   258     end;
   258 
   259 
   259 case Kind of
   260 case Kind of
   260    gtAmmo_Bomb,
   261      gtAmmo_Bomb,
   261  gtClusterBomb: begin
   262      gtClusterBomb,
       
   263      gtGasBomb: begin
   262                 gear^.ImpactSound:= sndGrenadeImpact;
   264                 gear^.ImpactSound:= sndGrenadeImpact;
   263                 gear^.nImpactSounds:= 1;
   265                 gear^.nImpactSounds:= 1;
   264                 gear^.AdvBounce:= 1;
   266                 gear^.AdvBounce:= 1;
   265                 gear^.Radius:= 4;
   267                 gear^.Radius:= 4;
   266                 gear^.Elasticity:= _0_6;
   268                 gear^.Elasticity:= _0_6;
  1647 Gear:= GearsList;
  1649 Gear:= GearsList;
  1648 while Gear<>nil do
  1650 while Gear<>nil do
  1649     begin
  1651     begin
  1650     case Gear^.Kind of
  1652     case Gear^.Kind of
  1651        gtAmmo_Bomb: DrawRotated(sprBomb, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, Gear^.DirAngle);
  1653        gtAmmo_Bomb: DrawRotated(sprBomb, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, Gear^.DirAngle);
       
  1654        gtGasBomb: DrawRotated(sprBomb, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, Gear^.DirAngle);
  1652     gtMolotov: DrawRotated(sprMolotov, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, Gear^.DirAngle);
  1655     gtMolotov: DrawRotated(sprMolotov, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, Gear^.DirAngle);
  1653 
  1656 
  1654        gtRCPlane: begin
  1657        gtRCPlane: begin
  1655                   if (Gear^.Tag = -1) then
  1658                   if (Gear^.Tag = -1) then
  1656                      DrawRotated(sprPlane, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, -1,  DxDy2Angle(Gear^.dX, Gear^.dY) + 90)
  1659                      DrawRotated(sprPlane, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, -1,  DxDy2Angle(Gear^.dX, Gear^.dY) + 90)