Fix swimming rubberduck screwing up after portal, also change timer to 15s, no resets
--- a/hedgewars/uGearsHandlersMess.pas Sat Apr 08 21:48:39 2017 +0200
+++ b/hedgewars/uGearsHandlersMess.pas Thu May 12 16:20:17 2016 +0200
@@ -4395,6 +4395,9 @@
if not ((Gear^.dX*ox + Gear^.dY*oy).isNegative) then
continue;
+ if iterator^.Kind = gtDuck then
+ iterator^.Pos:= 0;
+
isbullet:= (iterator^.Kind in [gtShotgunShot, gtDEagleShot, gtSniperRifleShot, gtSineGunShot]);
r:= int2hwFloat(iterator^.Radius);
@@ -6374,9 +6377,7 @@
if Gear^.dY > _0_4 then
PlaySound(sndDuckWater);
Gear^.Pos:= 1;
- Gear^.Timer:= Gear^.WDTimer;
Gear^.dY:= _0;
- Gear^.State:= Gear^.State or gstNoGravity;
end;
end
--- a/hedgewars/uGearsList.pas Sat Apr 08 21:48:39 2017 +0200
+++ b/hedgewars/uGearsList.pas Thu May 12 16:20:17 2016 +0200
@@ -723,8 +723,7 @@
gear^.Pos:= 0; // 0: falling/in air, 1-4: on water
gear^.Tag:= 1; // 1: facing right, -1: facing left
if gear^.Timer = 0 then
- gear^.Timer:= 9000; // Explosion timer to avoid duck existing forever
- gear^.WDTimer:= gear^.Timer; // For restoring the timer, timer is reset when hitting water
+ gear^.Timer:= 15000; // Explosion timer to avoid duck existing forever
gear^.Radius:= 9; // Collision radius (with landscape)
gear^.Karma:= 24; // Distance from water when swimming
gear^.Elasticity:= _0_6;
--- a/hedgewars/uVariables.pas Sat Apr 08 21:48:39 2017 +0200
+++ b/hedgewars/uVariables.pas Thu May 12 16:20:17 2016 +0200
@@ -2396,7 +2396,7 @@
ammoprop_AltUse;
Count: 2;
NumPerTurn: 0;
- Timer: 9000;
+ Timer: 15000;
Pos: 0;
AmmoType: amDuck;
AttackVoice: sndNone;