# HG changeset patch # User nemo # Date 1447600962 18000 # Node ID c93f204a5a00d99b1bf8489c1ab4c37e9908b8f0 # Parent 4bf720dcef017fdd6cdb9058d21597553faa5dce Set gears that go off map to gmDestroy instead of collision, disable morewind for no-gravity gears, restrict application of wind to gears that are already moving and not colliding. diff -r 4bf720dcef01 -r c93f204a5a00 hedgewars/uGearsHandlersMess.pas --- a/hedgewars/uGearsHandlersMess.pas Sun Nov 15 14:18:59 2015 +0100 +++ b/hedgewars/uGearsHandlersMess.pas Sun Nov 15 10:22:42 2015 -0500 @@ -343,7 +343,7 @@ // might need some testing/adjustments - just to avoid projectiles to fly forever (accelerated by wind/skips) if (gX < min(LAND_WIDTH div -2, -2048)) or (gX > max(LAND_WIDTH * 3 div 2, 6144)) then - Gear^.State := Gear^.State or gstCollision; + Gear^.Message := Gear^.Message or gmDestroy; if Gear^.dY.isNegative then begin @@ -464,11 +464,12 @@ if Gear^.AdvBounce > 1 then dec(Gear^.AdvBounce); - if isFalling then - begin - if Gear^.State and gstNoGravity = 0 then - Gear^.dY := Gear^.dY + cGravity; - if (GameFlags and gfMoreWind) <> 0 then + if isFalling and (Gear^.State and gstNoGravity = 0) then + begin + Gear^.dY := Gear^.dY + cGravity; + if (GameFlags and gfMoreWind <> 0) and + ((xland or land) = 0) and + ((Gear^.dX.QWordValue + Gear^.dY.QWordValue) > _0_02.QWordValue) then Gear^.dX := Gear^.dX + cWindSpeed / Gear^.Density end; @@ -482,10 +483,7 @@ Gear^.State := Gear^.State or gstMoving; if ((xland or land) and lfBouncy <> 0) and (Gear^.dX.QWordValue < _0_15.QWordValue) and (Gear^.dY.QWordValue < _0_15.QWordValue) then - begin Gear^.State := Gear^.State or gstCollision; - AddFileLog('no more bounce for you!'); - end; if ((xland or land) and lfBouncy <> 0) and (Gear^.Radius >= 3) and ((Gear^.dX.QWordValue > _0_15.QWordValue) or (Gear^.dY.QWordValue > _0_15.QWordValue)) then