Fix rubber duck not bouncing off diagonal rubber
authorWuzzy <almikes@aol.com>
Thu, 12 May 2016 18:16:09 +0200
changeset 12199 f7c295971143
parent 12198 f770c8029f7c
child 12200 02f6d786627d
Fix rubber duck not bouncing off diagonal rubber
hedgewars/uGearsHandlersMess.pas
hedgewars/uGearsList.pas
--- a/hedgewars/uGearsHandlersMess.pas	Thu May 12 17:23:06 2016 +0200
+++ b/hedgewars/uGearsHandlersMess.pas	Thu May 12 18:16:09 2016 +0200
@@ -6424,8 +6424,10 @@
             end;
         end;
 
+    if Gear^.Pos <> 0 then
+        // Manual collision check required because we don't use onStepFallingGear in this case
+        CheckCollision(Gear);
     // Explode duck
-    CheckCollision(Gear);
     if (Gear^.Timer = 0) or ((Gear^.State and gstCollision) <> 0) then
         begin
         doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), Gear^.Boom, Gear^.Hedgehog, EXPLAutoSound);
--- a/hedgewars/uGearsList.pas	Thu May 12 17:23:06 2016 +0200
+++ b/hedgewars/uGearsList.pas	Thu May 12 18:16:09 2016 +0200
@@ -727,7 +727,7 @@
                 gear^.Radius:= 9;            // Collision radius (with landscape)
                 gear^.Karma:= 24;            // Distance from water when swimming
                 gear^.Elasticity:= _0_6;
-                gear^.Friction:= _0_03;
+                gear^.Friction:= _0_8;
                 gear^.Density:= _0_5;
                 gear^.AdvBounce:= 1;
                 end;