hedgewars/uGearsHandlersMess.pas
changeset 10379 caa5b40e405b
parent 10372 e49b76a12800
child 10411 ee4e6d392b31
equal deleted inserted replaced
10378:c2b976d6c4f1 10379:caa5b40e405b
  2195         if (Gear^.Timer = 1) and (GameTicks and $3 = 0) then
  2195         if (Gear^.Timer = 1) and (GameTicks and $3 = 0) then
  2196             begin
  2196             begin
  2197             Gear^.Y:= Gear^.Y+_6;
  2197             Gear^.Y:= Gear^.Y+_6;
  2198             if (landPixel and lfIce <> 0) or (TestCollisionYwithGear(Gear, 1) and lfIce <> 0) then
  2198             if (landPixel and lfIce <> 0) or (TestCollisionYwithGear(Gear, 1) and lfIce <> 0) then
  2199                 begin
  2199                 begin
  2200                 gY := gy-6;
  2200                 gX := hwRound(Gear^.X);
       
  2201                 gY := hwRound(Gear^.Y) - 6;
  2201                 DrawExplosion(gX, gY, 4);
  2202                 DrawExplosion(gX, gY, 4);
  2202                 PlaySound(sndVaporize);
  2203                 PlaySound(sndVaporize);
  2203                 AddVisualGear(gX - 3 + Random(6), gY - 2, vgtSteam);
  2204                 AddVisualGear(gX - 3 + Random(6), gY - 2, vgtSteam);
  2204                 DeleteGear(Gear);
  2205                 DeleteGear(Gear);
  2205                 exit
  2206                 exit
  2225             dec(Gear^.Timer);
  2226             dec(Gear^.Timer);
  2226             inc(Gear^.Damage)
  2227             inc(Gear^.Damage)
  2227             end
  2228             end
  2228         else
  2229         else
  2229             begin
  2230             begin
       
  2231             gX := hwRound(Gear^.X);
       
  2232             gY := hwRound(Gear^.Y);
  2230             // Standard fire
  2233             // Standard fire
  2231             if not sticky then
  2234             if not sticky then
  2232                 begin
  2235                 begin
  2233                 if ((GameTicks and $1) = 0) then
  2236                 if ((GameTicks and $1) = 0) then
  2234                     begin
  2237                     begin
  2274                 end
  2277                 end
  2275             end
  2278             end
  2276         end;
  2279         end;
  2277     if Gear^.Health = 0 then
  2280     if Gear^.Health = 0 then
  2278         begin
  2281         begin
       
  2282         gX := hwRound(Gear^.X);
       
  2283         gY := hwRound(Gear^.Y);
  2279         if not sticky then
  2284         if not sticky then
  2280             begin
  2285             begin
  2281             if ((GameTicks and $3) = 0) and (Random(1) = 0) then
  2286             if ((GameTicks and $3) = 0) and (Random(1) = 0) then
  2282                 for i:= Random(2) downto 0 do
  2287                 for i:= Random(2) downto 0 do
  2283                     AddVisualGear(gX - 3 + Random(6), gY - 2, vgtSmoke);
  2288                     AddVisualGear(gX - 3 + Random(6), gY - 2, vgtSmoke);