5133 Y:= Hedgehog^.Gear^.Y; |
5133 Y:= Hedgehog^.Gear^.Y; |
5134 end; |
5134 end; |
5135 end; |
5135 end; |
5136 |
5136 |
5137 procedure doStepIceGun(Gear: PGear); |
5137 procedure doStepIceGun(Gear: PGear); |
5138 const iceWaitCollision:Longint = 0; |
5138 const iceWaitCollision = 0; |
5139 const iceCollideWithGround:Longint = 1; |
5139 const iceCollideWithGround = 1; |
5140 //const iceWaitNextTarget:Longint = 2; |
5140 //const iceWaitNextTarget:Longint = 2; |
5141 //const iceCollideWithHog:Longint = 4; |
5141 //const iceCollideWithHog:Longint = 4; |
5142 const iceCollideWithWater:Longint = 5; |
5142 const iceCollideWithWater = 5; |
5143 //const waterFreezingTime:Longint = 500; |
5143 //const waterFreezingTime:Longint = 500; |
5144 const groundFreezingTime:Longint = 1000; |
5144 const groundFreezingTime = 1000; |
5145 const iceRadius = 32; |
5145 const iceRadius = 32; |
5146 const iceHeight = 40; |
5146 const iceHeight = 40; |
5147 var |
5147 var |
5148 HHGear, iter: PGear; |
5148 HHGear, iter: PGear; |
5149 landRect: TSDL_Rect; |
5149 landRect: TSDL_Rect; |
5150 ndX, ndY: hwFloat; |
5150 ndX, ndY: hwFloat; |
5151 i, j, t, gX, gY: LongInt; |
5151 i, t, gX, gY: LongInt; |
5152 hogs: PGearArrayS; |
5152 hogs: PGearArrayS; |
5153 vg: PVisualGear; |
5153 vg: PVisualGear; |
5154 begin |
5154 begin |
5155 HHGear := Gear^.Hedgehog^.Gear; |
5155 HHGear := Gear^.Hedgehog^.Gear; |
5156 if (Gear^.Message and gmAttack <> 0) or (Gear^.Health = 0) or (HHGear = nil) or (HHGear^.Damage <> 0) or (HHGear^.dX.QWordValue > 4294967) then |
5156 if (Gear^.Message and gmAttack <> 0) or (Gear^.Health = 0) or (HHGear = nil) or (HHGear^.Damage <> 0) or (HHGear^.dX.QWordValue > 4294967) then |
5229 begin |
5229 begin |
5230 vg:= AddVisualGear(hwRound(iter^.X)+random(4)-8, hwRound(iter^.Y)+random(8), vgtDust, 1); |
5230 vg:= AddVisualGear(hwRound(iter^.X)+random(4)-8, hwRound(iter^.Y)+random(8), vgtDust, 1); |
5231 if vg <> nil then |
5231 if vg <> nil then |
5232 begin |
5232 begin |
5233 i:= random(100) + 155; |
5233 i:= random(100) + 155; |
5234 vg^.Tint:= i shl 24 or i shl 16 or $FF shl 8 or Longword(random(200) + 55); |
5234 vg^.Tint:= (i shl 24) or (i shl 16) or ($FF shl 8) or (random(200) + 55); |
5235 vg^.Angle:= random(360); |
5235 vg^.Angle:= random(360); |
5236 vg^.dx:= 0.001 * random(80); |
5236 vg^.dx:= 0.001 * random(80); |
5237 vg^.dy:= 0.001 * random(80) |
5237 vg^.dy:= 0.001 * random(80) |
5238 end |
5238 end |
5239 end; |
5239 end; |