make cheating a bit easier (mikade insisted). Also, try flipping dust for a bit more variety.
authornemo
Sat, 25 Aug 2012 08:39:52 -0400
changeset 7597 1ef520fea21c
parent 7596 2c12b8cbd002
child 7598 f06d8603097c
make cheating a bit easier (mikade insisted). Also, try flipping dust for a bit more variety.
hedgewars/uGearsHedgehog.pas
hedgewars/uVisualGears.pas
--- a/hedgewars/uGearsHedgehog.pas	Fri Aug 24 20:43:44 2012 -0400
+++ b/hedgewars/uGearsHedgehog.pas	Sat Aug 25 08:39:52 2012 -0400
@@ -572,7 +572,6 @@
 var s: shortstring;
     vga: PVisualGear;
 begin
-    PlaySound(sndShotgunReload);
     if cnt <> 0 then AddAmmo(HH, ammo, cnt)
     else AddAmmo(HH, ammo);
 
@@ -614,6 +613,7 @@
 case Gear^.Pos of
        posCaseUtility,
        posCaseAmmo: begin
+                    PlaySound(sndShotgunReload);
                     if Gear^.AmmoType <> amNothing then 
                         begin
                         AddPickup(HH^.Hedgehog^, Gear^.AmmoType, Gear^.Power, hwRound(Gear^.X), hwRound(Gear^.Y));
@@ -636,7 +636,7 @@
                                 end;
                             gi := gi^.NextGear
                             end;
-                        ag:= AddGear(hwRound(Gear^.X), hwRound(Gear^.Y), gtAddAmmo, gstInvisible, _0, _0, GetRandom(200)+100);
+                        ag:= AddGear(hwRound(Gear^.X), hwRound(Gear^.Y), gtAddAmmo, gstInvisible, _0, _0, GetRandom(100)+10);
                         ag^.Pos:= Gear^.Pos;
                         ag^.Power:= Gear^.Power
                         end;
--- a/hedgewars/uVisualGears.pas	Fri Aug 24 20:43:44 2012 -0400
+++ b/hedgewars/uVisualGears.pas	Sat Aug 25 08:39:52 2012 -0400
@@ -284,8 +284,9 @@
                 begin
                 dx:= 0.005 * (random(15) + 10);
                 dy:= 0.001 * (random(40) + 20);
-                if random(2) = 0 then
-                    dx := -dx;
+                if random(2) = 0 then dx := -dx;
+                if random(2) = 0 then Tag:= 1
+                else Tag:= -1;
                 Frame:= 7 - random(2);
                 FrameTicks:= random(20) + 15;
                 end;
@@ -642,9 +643,9 @@
                   vgtSmoke: DrawTextureF(SpritesData[sprSmoke].Texture, Gear^.scale, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, 7 - Gear^.Frame, 1, SpritesData[sprSmoke].Width, SpritesData[sprSmoke].Height);
                   vgtSmokeWhite: DrawSprite(sprSmokeWhite, round(Gear^.X) + WorldDx - 11, round(Gear^.Y) + WorldDy - 11, 7 - Gear^.Frame);
                   vgtDust: if Gear^.State = 1 then
-                               DrawSpriteRotatedF(sprSnowDust, round(Gear^.X) + WorldDx - 11, round(Gear^.Y) + WorldDy - 11, 7 - Gear^.Frame, 1, Gear^.Angle)
+                               DrawSpriteRotatedF(sprSnowDust, round(Gear^.X) + WorldDx - 11, round(Gear^.Y) + WorldDy - 11, 7 - Gear^.Frame, Gear^.Tag, Gear^.Angle)
                            else
-                               DrawSprite(sprDust, round(Gear^.X) + WorldDx - 11, round(Gear^.Y) + WorldDy - 11, 7 - Gear^.Frame);
+                               DrawSpriteRotatedF(sprDust, round(Gear^.X) + WorldDx - 11, round(Gear^.Y) + WorldDy - 11, 7 - Gear^.Frame, Gear^.Tag, Gear^.Angle);
                   vgtFire: if (Gear^.State and gstTmpFlag) = 0 then
                                DrawSprite(sprFlame, round(Gear^.X) + WorldDx - 8, round(Gear^.Y) + WorldDy, (RealTicks shr 6 + Gear^.Frame) mod 8)
                            else