hedgewars/uGears.pas
changeset 3039 057486a3a6c0
parent 3038 4e48c276a468
child 3042 872e5b3de293
--- a/hedgewars/uGears.pas	Sun Mar 21 19:02:03 2010 +0000
+++ b/hedgewars/uGears.pas	Sun Mar 21 20:53:34 2010 +0000
@@ -293,7 +293,8 @@
                 gear^.Radius:= 5;
                 gear^.Timer:= 500;
                 gear^.RenderTimer:= true;
-                gear^.Elasticity:= _0_9
+                gear^.Elasticity:= _0_9;
+                gear^.Tag:= getRandom(32);
                 end;
  gtShotgunShot: begin
                 gear^.Timer:= 900;
@@ -1592,7 +1593,7 @@
 
            gtGrave: DrawTextureF(PHedgehog(Gear^.Hedgehog)^.Team^.GraveTex, 1, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, (GameTicks shr 7) and 7, 1, 32, 32);
 
-             gtUFO: DrawSprite(sprUFO, hwRound(Gear^.X) - 16 + WorldDx, hwRound(Gear^.Y) - 16 + WorldDy, (GameTicks shr 7) mod 4);
+             gtUFO: DrawRotatedF(sprUFO, hwRound(Gear^.X) -16 + WorldDx, hwRound(Gear^.Y) - 16 + WorldDy, Gear^.Tag, 0, DxDy2Angle(Gear^.dY, Gear^.dX));
 
       gtPickHammer: DrawSprite(sprPHammer, hwRound(Gear^.X) - 16 + WorldDx, hwRound(Gear^.Y) - 50 + LongInt(((GameTicks shr 5) and 1) * 2) + WorldDy, 0);
             gtRope: DrawRope(Gear);