# HG changeset patch # User Wuzzy # Date 1463062817 -7200 # Node ID d7ccd18ae7bf12ba137963c440296fafd5613479 # Parent 98b31009fc37548b06f8d7f4c346c2feb13d68b6 Fix swimming rubberduck screwing up after portal, also change timer to 15s, no resets diff -r 98b31009fc37 -r d7ccd18ae7bf hedgewars/uGearsHandlersMess.pas --- 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 diff -r 98b31009fc37 -r d7ccd18ae7bf hedgewars/uGearsList.pas --- 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; diff -r 98b31009fc37 -r d7ccd18ae7bf hedgewars/uVariables.pas --- 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;