hedgewars/GSHandlers.inc
changeset 2935 b80800979436
parent 2934 e0f2b0f97c2b
child 2936 ed4c315dab2d
equal deleted inserted replaced
2934:e0f2b0f97c2b 2935:b80800979436
  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 hwAbs(Gear^.dX) < _0_001 then Gear^.dX:= _0;
  1272 	if hwAbs(Gear^.dX) < _0_0002 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;