radius and sprite drawing tweaks to match the still temporary sprite. also a begin/end sheepluva suggested
authornemo
Sun, 18 Jan 2015 14:47:25 -0500
changeset 10794 ace862eda192
parent 10792 f6df7d6e18e5
child 10796 f7cdca3ed697
radius and sprite drawing tweaks to match the still temporary sprite. also a begin/end sheepluva suggested
hedgewars/uGearsHandlersMess.pas
hedgewars/uGearsList.pas
hedgewars/uGearsRender.pas
--- a/hedgewars/uGearsHandlersMess.pas	Sun Jan 18 14:18:06 2015 -0500
+++ b/hedgewars/uGearsHandlersMess.pas	Sun Jan 18 14:47:25 2015 -0500
@@ -1811,6 +1811,7 @@
         end;
     if targ <> nil then
         begin
+        AddVisualGear(hwRound(targ^.X), hwRound(targ^.Y), vgtBubble);
         trackSpeed.QWordValue:= Gear^.Power;
         if (Gear^.X < targ^.X) and (Gear^.dX < _0_1)  then
              Gear^.dX:= Gear^.dX+trackSpeed
@@ -1826,6 +1827,7 @@
         if ((Gear^.State and gstAttacking) = 0) then
             begin
             if ((GameTicks and $1F) = 0) then
+                begin
                 if targ <> nil then
                     begin
                     tX:=Gear^.X-targ^.X;
@@ -1836,6 +1838,7 @@
                     end
                 else if (Gear^.Angle > 0) and (CheckGearNear(Gear, gtHedgehog, Gear^.Karma, Gear^.Karma) <> nil) then
                     Gear^.State := Gear^.State or gstAttacking
+                end
             end
         else // gstAttacking <> 0
             begin
--- a/hedgewars/uGearsList.pas	Sun Jan 18 14:18:06 2015 -0500
+++ b/hedgewars/uGearsList.pas	Sun Jan 18 14:47:25 2015 -0500
@@ -365,7 +365,7 @@
                 gear^.nImpactSounds:= 1;
                 gear^.Health:= 30;
                 gear^.State:= gear^.State or gstMoving or gstNoGravity;
-                gear^.Radius:= 3;
+                gear^.Radius:= 7;
                 gear^.Elasticity:= _0_55;
                 gear^.Friction:= _0_995;
                 gear^.Density:= _1;
--- a/hedgewars/uGearsRender.pas	Sun Jan 18 14:18:06 2015 -0500
+++ b/hedgewars/uGearsRender.pas	Sun Jan 18 14:47:25 2015 -0500
@@ -1120,7 +1120,7 @@
                        DrawSpriteRotated(sprMineOn, x, y, 0, Gear^.DirAngle)
                     else DrawSpriteRotated(sprMineDead, x, y, 0, Gear^.DirAngle);
                     end;
-         gtAirMine: DrawSprite(sprAirMine, x, y, (RealTicks div 125) mod 16);
+         gtAirMine: DrawSprite(sprAirMine, x-16, y-16, (RealTicks div 125) mod 16);
 
            gtSMine: if (((Gear^.State and gstAttacking) = 0)or((Gear^.Timer and $3FF) < 420)) and (Gear^.Health <> 0) then
                            DrawSpriteRotated(sprSMineOff, x, y, 0, Gear^.DirAngle)