hedgewars/GSHandlers.inc
changeset 7874 c8aba48f38dc
parent 7872 ab6db9e07c4d
child 7958 c031c3e2eb2a
child 7992 0b7dc27b2baf
equal deleted inserted replaced
7873:266fe9f1e5a9 7874:c8aba48f38dc
  5252     a: real;
  5252     a: real;
  5253 begin
  5253 begin
  5254     // Gear is shrunk so it can actually escape the hog without carving into the terrain
  5254     // Gear is shrunk so it can actually escape the hog without carving into the terrain
  5255     if (Gear^.Radius = 6) and (Gear^.CollisionMask = $FFFF) then Gear^.Radius:= 16;
  5255     if (Gear^.Radius = 6) and (Gear^.CollisionMask = $FFFF) then Gear^.Radius:= 16;
  5256     if Gear^.Damage > 100 then Gear^.CollisionMask:= 0
  5256     if Gear^.Damage > 100 then Gear^.CollisionMask:= 0
  5257     else if Gear^.Damage > 20 then
  5257     else if Gear^.Damage > 30 then
  5258         if GetRandom(max(2,10-Gear^.Damage div 10)) = 0 then Gear^.CollisionMask:= 0;
  5258         if GetRandom(max(4,18-Gear^.Damage div 10)) < 3 then Gear^.CollisionMask:= 0;
  5259     Gear^.Damage:= 0;
  5259     Gear^.Damage:= 0;
  5260     if Gear^.Timer > 0 then dec(Gear^.Timer);
  5260     if Gear^.Timer > 0 then dec(Gear^.Timer);
  5261     if (Gear^.State and gstMoving <> 0) and (Gear^.State and gstCollision = 0) then
  5261     if (Gear^.State and gstMoving <> 0) and (Gear^.State and gstCollision = 0) then
  5262         begin
  5262         begin
  5263         DeleteCI(Gear);
  5263         DeleteCI(Gear);