equal
deleted
inserted
replaced
2063 procedure doStepAirMine(Gear: PGear); |
2063 procedure doStepAirMine(Gear: PGear); |
2064 var i,t,targDist,tmpDist: LongWord; |
2064 var i,t,targDist,tmpDist: LongWord; |
2065 targ, tmpG: PGear; |
2065 targ, tmpG: PGear; |
2066 trackSpeed, airFriction, tX, tY: hwFloat; |
2066 trackSpeed, airFriction, tX, tY: hwFloat; |
2067 isUnderwater: Boolean; |
2067 isUnderwater: Boolean; |
|
2068 sparkle: PVisualGear; |
2068 begin |
2069 begin |
2069 if (Gear^.State and gstFrozen) <> 0 then |
2070 if (Gear^.State and gstFrozen) <> 0 then |
2070 begin |
2071 begin |
2071 if Gear^.Damage > 0 then |
2072 if Gear^.Damage > 0 then |
2072 begin |
2073 begin |
2092 |
2093 |
2093 //Disable targeting while the airmine is stunned |
2094 //Disable targeting while the airmine is stunned |
2094 if Gear^.Tag <> 0 then |
2095 if Gear^.Tag <> 0 then |
2095 begin |
2096 begin |
2096 Gear^.Hedgehog:= nil; |
2097 Gear^.Hedgehog:= nil; |
|
2098 |
|
2099 if ((Gear^.FlightTime and $FF) = 0) then |
|
2100 begin |
|
2101 sparkle:= AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtDust, 1); |
|
2102 if sparkle <> nil then |
|
2103 begin |
|
2104 sparkle^.dX:= 0.004 * (random(100) - 50); |
|
2105 sparkle^.dY:= -0.05 + 0.004 * (random(100) - 50); |
|
2106 sparkle^.Tint:= $D5CD8CFF; |
|
2107 sparkle^.Angle:= random(360); |
|
2108 end; |
|
2109 end; |
|
2110 |
2097 dec(Gear^.FlightTime); |
2111 dec(Gear^.FlightTime); |
2098 if Gear^.FlightTime = 0 then |
2112 if Gear^.FlightTime = 0 then |
2099 Gear^.Tag:= 0; |
2113 Gear^.Tag:= 0; |
2100 exit |
2114 exit |
2101 end; |
2115 end; |