hedgewars/uGearsHandlersMess.pas
changeset 15181 d13a38548112
parent 15180 061a3085d6d8
child 15196 a0bb57d3d272
equal deleted inserted replaced
15180:061a3085d6d8 15181:d13a38548112
  2061                     hwRound(Gear^.Y) - SpritesData[sprFrozenAirMine].Height div 2,
  2061                     hwRound(Gear^.Y) - SpritesData[sprFrozenAirMine].Height div 2,
  2062                     sprFrozenAirMine, 0, 0, false, false, false, false);
  2062                     sprFrozenAirMine, 0, 0, false, false, false, false);
  2063             DeleteGear(Gear);
  2063             DeleteGear(Gear);
  2064             exit
  2064             exit
  2065             end;
  2065             end;
  2066         doStepFallingGear(Gear);
  2066         if ((Gear^.dX.QWordValue + Gear^.dY.QWordValue) > _0_02.QWordValue) or ((GameTicks and $3F) = 15) then
       
  2067             doStepFallingGear(Gear);
  2067         exit
  2068         exit
  2068         end;
  2069         end;
  2069     isUnderwater:= CheckCoordInWater(hwRound(Gear^.X), hwRound(Gear^.Y) + Gear^.Radius);
  2070     isUnderwater:= CheckCoordInWater(hwRound(Gear^.X), hwRound(Gear^.Y) + Gear^.Radius);
  2070     if Gear^.Pos > 0 then
  2071     if Gear^.Pos > 0 then
  2071         begin
  2072         begin
  2075         else
  2076         else
  2076             dec(airFriction.QWordValue,Gear^.Pos);
  2077             dec(airFriction.QWordValue,Gear^.Pos);
  2077         Gear^.dX:= Gear^.dX*airFriction;
  2078         Gear^.dX:= Gear^.dX*airFriction;
  2078         Gear^.dY:= Gear^.dY*airFriction
  2079         Gear^.dY:= Gear^.dY*airFriction
  2079         end;
  2080         end;
  2080     doStepFallingGear(Gear);
  2081     if ((Gear^.dX.QWordValue + Gear^.dY.QWordValue) > _0_02.QWordValue) or ((GameTicks and $3F) = 15) then
       
  2082         doStepFallingGear(Gear);
  2081     if (TurnTimeLeft = 0) and ((Gear^.dX.QWordValue + Gear^.dY.QWordValue) > _0_02.QWordValue) then
  2083     if (TurnTimeLeft = 0) and ((Gear^.dX.QWordValue + Gear^.dY.QWordValue) > _0_02.QWordValue) then
  2082         AllInactive := false;
  2084         AllInactive := false;
  2083 
  2085 
  2084     // Disable targeting if airmine is not active yet
  2086     // Disable targeting if airmine is not active yet
  2085     if ((Gear^.State and gsttmpFlag) = 0) then
  2087     if ((Gear^.State and gsttmpFlag) = 0) then
  2204         end
  2206         end
  2205     else Gear^.Hedgehog:= nil;
  2207     else Gear^.Hedgehog:= nil;
  2206 
  2208 
  2207     if ((Gear^.State and gstAttacking) = 0) then
  2209     if ((Gear^.State and gstAttacking) = 0) then
  2208         begin
  2210         begin
  2209         if ((GameTicks and $1F) = 0) then
  2211         if (((GameTicks+Gear^.Uid) and $1F) = 0) then
  2210             begin
  2212             begin
  2211             if targ <> nil then
  2213             if targ <> nil then
  2212                 begin
  2214                 begin
  2213                 tX:=Gear^.X-targ^.X;
  2215                 tX:=Gear^.X-targ^.X;
  2214                 tY:=Gear^.Y-targ^.Y;
  2216                 tY:=Gear^.Y-targ^.Y;