# HG changeset patch # User Wuzzy # Date 1572126537 -7200 # Node ID d668fcb9307ec753b146f472e95c0809a0ebb6ca # Parent 91c972f126b7c8d1faf0479f53f7527f1b97b6b9 Add support for proper rendering of gtPoisonCloud with Timer > 5000 diff -r 91c972f126b7 -r d668fcb9307e hedgewars/uGearsList.pas --- a/hedgewars/uGearsList.pas Sat Oct 26 22:44:15 2019 +0200 +++ b/hedgewars/uGearsList.pas Sat Oct 26 23:48:57 2019 +0200 @@ -772,6 +772,7 @@ end; gtPoisonCloud: begin if gear^.Timer = 0 then gear^.Timer:= 5000; + gear^.WDTimer:= gear^.Timer; // initial timer gear^.dY:= int2hwfloat(-4 + longint(getRandom(8))) / 1000; gear^.Tint:= $C0C000C0 end; diff -r 91c972f126b7 -r d668fcb9307e hedgewars/uGearsRender.pas --- a/hedgewars/uGearsRender.pas Sat Oct 26 22:44:15 2019 +0200 +++ b/hedgewars/uGearsRender.pas Sat Oct 26 23:48:57 2019 +0200 @@ -1656,8 +1656,8 @@ gtPoisonCloud: begin if Gear^.Timer < 1020 then Tint(Gear^.Tint and $FFFFFF00 or Gear^.Timer div 8) - else if Gear^.Timer > 3980 then - Tint(Gear^.Tint and $FFFFFF00 or (5000 - Gear^.Timer) div 8) + else if (Gear^.Timer > Gear^.WDTimer - 1020) and (Gear^.WDTimer > 2040) then + Tint(Gear^.Tint and $FFFFFF00 or (Gear^.WDTimer - Gear^.Timer) div 8) else Tint(Gear^.Tint); DrawTextureRotatedF(SpritesData[sprSmokeWhite].texture, 3, 0, 0, x, y, 0, 1, 22, 22, (RealTicks shr 4 + Gear^.UID * 100) mod 360);