hedgewars/GSHandlers.inc
changeset 2934 e0f2b0f97c2b
parent 2933 02af54eb7e1e
child 2935 b80800979436
equal deleted inserted replaced
2933:02af54eb7e1e 2934:e0f2b0f97c2b
  1267         begin
  1267         begin
  1268         AllInactive:= false;
  1268         AllInactive:= false;
  1269         doStepFallingGear(Gear);
  1269         doStepFallingGear(Gear);
  1270         CalcRotationDirAngle(Gear)
  1270         CalcRotationDirAngle(Gear)
  1271         end;
  1271         end;
  1272 	if V < _0_001 then Gear^.dX:= _0;
  1272 	if hwAbs(Gear^.dX) < _0_001 then Gear^.dX:= _0;
  1273     
  1273     
  1274 	if ((Gear^.Health * 100 div cBarrelHealth) < random(90)) and ((GameTicks and $FF) = 0) then
  1274 	if ((Gear^.Health * 100 div cBarrelHealth) < random(90)) and ((GameTicks and $FF) = 0) then
  1275 		AddVisualGear(hwRound(Gear^.X) - 16 + Random(32), hwRound(Gear^.Y) - 2, vgtSmoke);
  1275 		AddVisualGear(hwRound(Gear^.X) - 16 + Random(32), hwRound(Gear^.Y) - 2, vgtSmoke);
  1276 	dec(Gear^.Health, Gear^.Damage);
  1276 	dec(Gear^.Health, Gear^.Damage);
  1277 	Gear^.Damage:= 0;
  1277 	Gear^.Damage:= 0;
  1312         begin
  1312         begin
  1313         Gear^.dY:= Gear^.dY + cGravity;
  1313         Gear^.dY:= Gear^.dY + cGravity;
  1314         Gear^.Y:= Gear^.Y + Gear^.dY;
  1314         Gear^.Y:= Gear^.Y + Gear^.dY;
  1315 	    if (Gear^.dY.isNegative) and TestCollisionYwithGear(Gear, -1) then Gear^.dY:= _0
  1315 	    if (Gear^.dY.isNegative) and TestCollisionYwithGear(Gear, -1) then Gear^.dY:= _0
  1316         end;
  1316         end;
  1317     if V > _0_001 then SetAllHHToActive;
  1317     if Gear^.dY < _0_001 then SetAllHHToActive;
  1318 	if (not Gear^.dY.isNegative) and TestCollisionYwithGear(Gear, 1) then
  1318 	if (not Gear^.dY.isNegative) and TestCollisionYwithGear(Gear, 1) then
  1319 		begin
  1319 		begin
  1320         if (V > _0_02) and (k = gtExplosives) and ((Gear^.State and gstAnimation) <> 0) then
  1320         if (V > _0_02) and (k = gtExplosives) and ((Gear^.State and gstAnimation) <> 0) then
  1321             inc(Gear^.Damage, hwRound(V * _70));
  1321             inc(Gear^.Damage, hwRound(V * _70));
  1322 
  1322