hedgewars/uGearsHandlersMess.pas
changeset 12094 4dfc95eabee1
parent 11918 9da78300c5d0
child 12119 3374e0f67f39
equal deleted inserted replaced
12093:0d6e0ed36c9e 12094:4dfc95eabee1
  1750                     Gear^.State := Gear^.State or gstAttacking
  1750                     Gear^.State := Gear^.State or gstAttacking
  1751             end
  1751             end
  1752         else // gstAttacking <> 0
  1752         else // gstAttacking <> 0
  1753             begin
  1753             begin
  1754             AllInactive := false;
  1754             AllInactive := false;
       
  1755             // tag of 1 means this mine has a random timer
       
  1756             if (Gear^.Tag = 1) and (Gear^.Timer = 0) then
       
  1757                 begin
       
  1758                 if (GameTicks mod 2 = 0) then GetRandom(2);
       
  1759                 if (GameTicks mod 3 = 0) then GetRandom(2);
       
  1760                 Gear^.Timer:= GetRandom(51) * 100;
       
  1761                 Gear^.Tag:= 0;
       
  1762                 end;
  1755             if (Gear^.Timer and $FF) = 0 then
  1763             if (Gear^.Timer and $FF) = 0 then
  1756                 PlaySound(sndMineTick);
  1764                 PlaySound(sndMineTick);
  1757             if Gear^.Timer = 0 then
  1765             if Gear^.Timer = 0 then
  1758                 begin
  1766                 begin
  1759                 if ((Gear^.State and gstWait) <> 0)
  1767                 if ((Gear^.State and gstWait) <> 0)