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 , uConsole, uGearsHandlers, uTextures, uRenderUtils, uAmmos, uTeams, uLandTexture |
152 , 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; |
3067 //////////////////////////////////////////////////////////////////////////////// |
3067 //////////////////////////////////////////////////////////////////////////////// |
3068 procedure doStepAirAttackWork(Gear: PGear); |
3068 procedure doStepAirAttackWork(Gear: PGear); |
3069 begin |
3069 begin |
3070 AllInactive := false; |
3070 AllInactive := false; |
3071 Gear^.X := Gear^.X + cAirPlaneSpeed * Gear^.Tag; |
3071 Gear^.X := Gear^.X + cAirPlaneSpeed * Gear^.Tag; |
3072 WriteLnToConsole('X='+IntToStr(hwRound(Gear^.X))+' dX='+cstr(gear^.dx)+' PLUS='+cstr(Gear^.dx+cAirPlaneSpeed)); |
|
3073 if (Gear^.Health > 0) and (not (Gear^.X < Gear^.dX)) and (Gear^.X < Gear^.dX + cAirPlaneSpeed) then |
3072 if (Gear^.Health > 0) and (not (Gear^.X < Gear^.dX)) and (Gear^.X < Gear^.dX + cAirPlaneSpeed) then |
3074 begin |
3073 begin |
3075 dec(Gear^.Health); |
3074 dec(Gear^.Health); |
3076 if (WorldEdge = weBounce) and (((Gear^.Tag = 1) and (hwRound(Gear^.X) > rightX)) or ((Gear^.Tag = -1) and (hwRound(Gear^.X) < leftX))) then |
3075 if (WorldEdge = weBounce) and (((Gear^.Tag = 1) and (hwRound(Gear^.X) > rightX)) or ((Gear^.Tag = -1) and (hwRound(Gear^.X) < leftX))) then |
3077 begin |
3076 begin |