hedgewars/uGearsHandlersMess.pas
changeset 14209 4b418709b1cf
parent 14207 dcf235a1f86b
child 14287 6015b74eea55
equal deleted inserted replaced
14208:076c9fba3fa8 14209:4b418709b1cf
  2092         AllInactive := false;
  2092         AllInactive := false;
  2093 
  2093 
  2094     //Disable targeting while the airmine is stunned
  2094     //Disable targeting while the airmine is stunned
  2095     if Gear^.Tag <> 0 then
  2095     if Gear^.Tag <> 0 then
  2096         begin
  2096         begin
  2097         Gear^.Hedgehog:= nil;
       
  2098 
       
  2099         if ((Gear^.FlightTime and $FF) = 0) then
  2097         if ((Gear^.FlightTime and $FF) = 0) then
  2100             begin
  2098             begin
  2101             sparkle:= AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtDust, 1);
  2099             sparkle:= AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtDust, 1);
  2102             if sparkle <> nil then
  2100             if sparkle <> nil then
  2103                 begin
  2101                 begin
  2108                 end;
  2106                 end;
  2109             end;
  2107             end;
  2110 
  2108 
  2111         dec(Gear^.FlightTime);
  2109         dec(Gear^.FlightTime);
  2112         if Gear^.FlightTime = 0 then
  2110         if Gear^.FlightTime = 0 then
       
  2111             begin
  2113             Gear^.Tag:= 0;
  2112             Gear^.Tag:= 0;
       
  2113             Gear^.Hedgehog:= nil;
       
  2114             Gear^.State:= Gear^.State and (not gstAttacking);
       
  2115             Gear^.Timer:= Gear^.WDTimer
       
  2116             end;
  2114         exit
  2117         exit
  2115         end;
  2118         end;
  2116 
  2119 
  2117     if (TurnTimeLeft = 0) or (Gear^.Angle = 0) or (Gear^.Hedgehog = nil) or (Gear^.Hedgehog^.Gear = nil) then
  2120     if (TurnTimeLeft = 0) or (Gear^.Angle = 0) or (Gear^.Hedgehog = nil) or (Gear^.Hedgehog^.Gear = nil) then
  2118         begin
  2121         begin