147 snowLeft,snowRight: LongInt; |
147 snowLeft,snowRight: LongInt; |
148 |
148 |
149 implementation |
149 implementation |
150 uses uConsts, uVariables, uVisualGearsList, uRandom, uCollisions, uGearsList, uUtils, uSound |
150 uses uConsts, uVariables, uVisualGearsList, uRandom, uCollisions, uGearsList, uUtils, uSound |
151 , SDLh, uScript, uGearsHedgehog, uGearsUtils, uIO, uCaptions, uLandGraphics |
151 , SDLh, uScript, uGearsHedgehog, uGearsUtils, uIO, uCaptions, uLandGraphics |
152 , uGearsHandlers, uTextures, uRenderUtils, uAmmos, uTeams, uLandTexture |
152 , uConsole, uGearsHandlers, uTextures, uRenderUtils, uAmmos, uTeams, uLandTexture |
153 , uStore, uAI, uStats, uLocale; |
153 , uStore, uAI, uStats, uLocale; |
154 |
154 |
155 procedure doStepPerPixel(Gear: PGear; step: TGearStepProcedure; onlyCheckIfChanged: boolean); |
155 procedure doStepPerPixel(Gear: PGear; step: TGearStepProcedure; onlyCheckIfChanged: boolean); |
156 var |
156 var |
157 dX, dY, sX, sY: hwFloat; |
157 dX, dY, sX, sY: hwFloat; |
3060 //////////////////////////////////////////////////////////////////////////////// |
3060 //////////////////////////////////////////////////////////////////////////////// |
3061 procedure doStepAirAttackWork(Gear: PGear); |
3061 procedure doStepAirAttackWork(Gear: PGear); |
3062 begin |
3062 begin |
3063 AllInactive := false; |
3063 AllInactive := false; |
3064 Gear^.X := Gear^.X + cAirPlaneSpeed * Gear^.Tag; |
3064 Gear^.X := Gear^.X + cAirPlaneSpeed * Gear^.Tag; |
3065 |
3065 WriteLnToConsole('X='+IntToStr(hwRound(Gear^.X))+' dX='+cstr(gear^.dx)+' PLUS='+cstr(Gear^.dx+cAirPlaneSpeed)); |
3066 if (Gear^.Health > 0) and (not (Gear^.X < Gear^.dX)) and (Gear^.X < Gear^.dX + cAirPlaneSpeed) then |
3066 if (Gear^.Health > 0) and (not (Gear^.X < Gear^.dX)) and (Gear^.X < Gear^.dX + cAirPlaneSpeed) then |
3067 begin |
3067 begin |
3068 dec(Gear^.Health); |
3068 dec(Gear^.Health); |
3069 if (WorldEdge = weBounce) and (((Gear^.Tag = 1) and (hwRound(Gear^.X) > rightX)) or ((Gear^.Tag = -1) and (hwRound(Gear^.X) < leftX))) then |
3069 if (WorldEdge = weBounce) and (((Gear^.Tag = 1) and (hwRound(Gear^.X) > rightX)) or ((Gear^.Tag = -1) and (hwRound(Gear^.X) < leftX))) then |
3070 begin |
3070 begin |