hedgewars/GSHandlers.inc
branchicegun
changeset 8565 a431fa208a45
parent 8563 4d9d8287e601
child 8570 cbd25e677446
equal deleted inserted replaced
8563:4d9d8287e601 8565:a431fa208a45
  5242 
  5242 
  5243 // freeze nearby hogs
  5243 // freeze nearby hogs
  5244                 hogs := GearsNear(int2hwFloat(Target.X), int2hwFloat(Target.Y), gtHedgehog, Gear^.Radius*2);
  5244                 hogs := GearsNear(int2hwFloat(Target.X), int2hwFloat(Target.Y), gtHedgehog, Gear^.Radius*2);
  5245                 if hogs.size > 0 then
  5245                 if hogs.size > 0 then
  5246                     for i:= 0 to hogs.size - 1 do
  5246                     for i:= 0 to hogs.size - 1 do
  5247                     begin
       
  5248                         if hogs.ar^[i] <> HHGear then
  5247                         if hogs.ar^[i] <> HHGear then
  5249                         begin
       
  5250                             if GameTicks mod 5 = 0 then 
  5248                             if GameTicks mod 5 = 0 then 
  5251                             if hogs.ar^[i]^.Hedgehog^.Effects[heFrozen] < 256 then
       
  5252                                 hogs.ar^[i]^.Hedgehog^.Effects[heFrozen] := hogs.ar^[i]^.Hedgehog^.Effects[heFrozen] + 1
       
  5253                             else if hogs.ar^[i]^.Hedgehog^.Effects[heFrozen] = 256 then
       
  5254                                 begin
  5249                                 begin
  5255                                 hogs.ar^[i]^.Hedgehog^.Effects[heFrozen]:= 100000;
  5250                                 hogs.ar^[i]^.Active:= true;
  5256                                 hogs.ar^[i]^.Active:= true
  5251                                 if hogs.ar^[i]^.Hedgehog^.Effects[heFrozen] < 256 then
       
  5252                                     hogs.ar^[i]^.Hedgehog^.Effects[heFrozen] := hogs.ar^[i]^.Hedgehog^.Effects[heFrozen] + 1
       
  5253                                 else if hogs.ar^[i]^.Hedgehog^.Effects[heFrozen] = 256 then
       
  5254                                     hogs.ar^[i]^.Hedgehog^.Effects[heFrozen]:= 100000
  5257                                 end;
  5255                                 end;
  5258                         end;                        
       
  5259                     end;
       
  5260                 inc(Pos)
  5256                 inc(Pos)
  5261             end
  5257             end
  5262             else if (t > 400) and ((gY > cWaterLine) or
  5258             else if (t > 400) and ((gY > cWaterLine) or
  5263                     (((gX and LAND_WIDTH_MASK = 0) and (gY and LAND_HEIGHT_MASK = 0))
  5259                     (((gX and LAND_WIDTH_MASK = 0) and (gY and LAND_HEIGHT_MASK = 0))
  5264                         and (Land[gY, gX] <> 0))) then
  5260                         and (Land[gY, gX] <> 0))) then