hedgewars/GSHandlers.inc
changeset 7726 1137406bce12
parent 7721 2b1ad418ba39
child 7729 c374746bb56e
equal deleted inserted replaced
7725:4ad05a478c6c 7726:1137406bce12
   313     if (Gear^.Kind = gtBall) and ((Gear^.State and gstTmpFlag) <> 0) then
   313     if (Gear^.Kind = gtBall) and ((Gear^.State and gstTmpFlag) <> 0) then
   314         begin
   314         begin
   315         CheckCollision(Gear);
   315         CheckCollision(Gear);
   316         if (Gear^.State and gstCollision) <> 0 then
   316         if (Gear^.State and gstCollision) <> 0 then
   317             doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 20, Gear^.Hedgehog, EXPLDontDraw or EXPLNoGfx);
   317             doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 20, Gear^.Hedgehog, EXPLDontDraw or EXPLNoGfx);
   318     end;
   318         end;
   319 
   319 
   320     if (Gear^.Kind = gtGasBomb) and ((GameTicks mod 200) = 0) then
   320     if (Gear^.Kind = gtGasBomb) and ((GameTicks mod 200) = 0) then
   321         begin
   321         begin
   322         vg:= AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtSmokeWhite);
   322         vg:= AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtSmokeWhite);
   323         if vg <> nil then
   323         if vg <> nil then
   324             vg^.Tint:= $FFC0C000;
   324             vg^.Tint:= $FFC0C000;
   325     end;
   325         end;
   326 
   326 
   327     if Gear^.Timer = 0 then
   327     if Gear^.Timer = 0 then
   328         begin
   328         begin
   329         case Gear^.Kind of 
   329         case Gear^.Kind of 
   330             gtGrenade: doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 50, Gear^.Hedgehog, EXPLAutoSound);
   330             gtGrenade: doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 50, Gear^.Hedgehog, EXPLAutoSound);
   384                     x:= GetRandom(60);
   384                     x:= GetRandom(60);
   385                     y:= GetRandom(40);
   385                     y:= GetRandom(40);
   386                     FollowGear:= AddGear(hwRound(Gear^.X) - 30 + x, hwRound(Gear^.Y) - 20 + y, gtPoisonCloud, 0, _0, _0, 0);
   386                     FollowGear:= AddGear(hwRound(Gear^.X) - 30 + x, hwRound(Gear^.Y) - 20 + y, gtPoisonCloud, 0, _0, _0, 0);
   387                     end
   387                     end
   388                 end;
   388                 end;
   389         end;
   389             end;
   390     DeleteGear(Gear);
   390         DeleteGear(Gear);
   391     exit
   391         exit
   392     end;
   392         end;
   393 
   393 
   394     CalcRotationDirAngle(Gear);
   394     CalcRotationDirAngle(Gear);
   395 
   395 
   396     if Gear^.Kind = gtHellishBomb then
   396     if Gear^.Kind = gtHellishBomb then
   397         begin
   397         begin