for real this time
authorsheepluva
Sat, 05 Jul 2014 21:22:42 +0200
changeset 10356 7d1044267b83
parent 10355 334b5f513703
child 10357 86a823dd1d23
for real this time
hedgewars/uGearsHandlersMess.pas
hedgewars/uGearsUtils.pas
--- a/hedgewars/uGearsHandlersMess.pas	Sat Jul 05 20:27:42 2014 +0200
+++ b/hedgewars/uGearsHandlersMess.pas	Sat Jul 05 21:22:42 2014 +0200
@@ -282,10 +282,6 @@
     else
         Gear^.X := Gear^.X + Gear^.dX * cDrownSpeed;
 
-    if cWaterLine < hwRound(Gear^.Y) + Gear^.Radius then
-    else
-        Gear^.Y := Gear^.Y + Gear^.dY * cDrownSpeed;
-
     // Create some bubbles (0.5% might be better but causes too few bubbles sometimes)
     if ((not SuddenDeathDmg and (WaterOpacity < $FF))
     or (SuddenDeathDmg and (SDWaterOpacity < $FF))) and ((GameTicks and $1F) = 0) then
--- a/hedgewars/uGearsUtils.pas	Sat Jul 05 20:27:42 2014 +0200
+++ b/hedgewars/uGearsUtils.pas	Sat Jul 05 21:22:42 2014 +0200
@@ -468,7 +468,7 @@
                     ((Gear <> CurrentHedgehog^.Gear) or (CurAmmoGear = nil) or (CurAmmoGear^.State and gstSubmersible = 0)) then
                 DrownGear(Gear);
 
-            isImpactRight:= isImpactH and (abs(X - leftX) > abs(rightX - X));
+            isImpactRight:= isImpactH and (abs(X - LongInt(leftX)) > abs(LongInt(rightX) - X));
             isLeaving:= (isSubmersible and (dist2Water = -2 * Gear^.Radius) and (Gear = CurAmmoGear) and (CurAmmoGear^.Pos = 0)
             and (((not isImpactH) and CurAmmoGear^.dY.isNegative) or (isImpactH and (isImpactRight = CurAmmoGear^.dX.isNegative))));