# HG changeset patch # User nemo # Date 1267755582 0 # Node ID e0f2b0f97c2bf172ded21e2229b22c3dd51d0555 # Parent 02af54eb7e1e7085266fd75de0c1cb255b7065b1 Try not to hang the simulation :) diff -r 02af54eb7e1e -r e0f2b0f97c2b hedgewars/GSHandlers.inc --- a/hedgewars/GSHandlers.inc Fri Mar 05 02:17:03 2010 +0000 +++ b/hedgewars/GSHandlers.inc Fri Mar 05 02:19:42 2010 +0000 @@ -1269,7 +1269,7 @@ doStepFallingGear(Gear); CalcRotationDirAngle(Gear) end; - if V < _0_001 then Gear^.dX:= _0; + if hwAbs(Gear^.dX) < _0_001 then Gear^.dX:= _0; if ((Gear^.Health * 100 div cBarrelHealth) < random(90)) and ((GameTicks and $FF) = 0) then AddVisualGear(hwRound(Gear^.X) - 16 + Random(32), hwRound(Gear^.Y) - 2, vgtSmoke); @@ -1314,7 +1314,7 @@ Gear^.Y:= Gear^.Y + Gear^.dY; if (Gear^.dY.isNegative) and TestCollisionYwithGear(Gear, -1) then Gear^.dY:= _0 end; - if V > _0_001 then SetAllHHToActive; + if Gear^.dY < _0_001 then SetAllHHToActive; if (not Gear^.dY.isNegative) and TestCollisionYwithGear(Gear, 1) then begin if (V > _0_02) and (k = gtExplosives) and ((Gear^.State and gstAnimation) <> 0) then diff -r 02af54eb7e1e -r e0f2b0f97c2b hedgewars/uGears.pas --- a/hedgewars/uGears.pas Fri Mar 05 02:17:03 2010 +0000 +++ b/hedgewars/uGears.pas Fri Mar 05 02:19:42 2010 +0000 @@ -329,7 +329,7 @@ gtExplosives: begin gear^.Radius:= 16; gear^.Elasticity:= _0_4; - gear^.Friction:= _1; + gear^.Friction:= _0_995; gear^.Health:= cBarrelHealth end; gtDEagleShot: begin