Better support for scripting by gears
authorunc0rr
Wed, 12 Aug 2009 09:43:05 +0000
changeset 2302 0f122917d799
parent 2301 7a4ad0772c88
child 2303 f411e9f8e6d4
Better support for scripting by gears
hedgewars/HHHandlers.inc
hedgewars/uGears.pas
hedgewars/uWorld.pas
--- a/hedgewars/HHHandlers.inc	Tue Aug 11 21:51:36 2009 +0000
+++ b/hedgewars/HHHandlers.inc	Wed Aug 12 09:43:05 2009 +0000
@@ -189,7 +189,7 @@
                                  end;
                     amSeduction: CurAmmoGear:= AddGear(hwRound(X + xx * cHHRadius * 2), hwRound(Y + yy * cHHRadius * 2), gtSeduction, 0, xx * _0_4, yy * _0_4, 0);
                    amWatermelon: FollowGear:= AddGear(hwRound(X), hwRound(Y), gtWatermelon,  0, xx*Power/cPowerDivisor, yy*Power/cPowerDivisor, Ammo^[CurSlot, CurAmmo].Timer);
-                  amHellishBomb: FollowGear:= AddGear(hwRound(X), hwRound(Y), gtHellishBomb,    0, xx*Power/cPowerDivisor, yy*Power/cPowerDivisor, 5000);
+                  amHellishBomb: FollowGear:= AddGear(hwRound(X), hwRound(Y), gtHellishBomb,    0, xx*Power/cPowerDivisor, yy*Power/cPowerDivisor, 0);
                        amNapalm: AddGear(Ammo^[CurSlot, CurAmmo].Pos, 0, gtAirAttack, 2, _0, _0, 0);
                         amDrill: FollowGear:= AddGear(hwRound(X), hwRound(Y), gtDrill, 0, xx*Power/cPowerDivisor, yy*Power/cPowerDivisor, 0);
                       amBallgun: CurAmmoGear:= AddGear(hwRound(X), hwRound(Y), gtBallgun,  0, xx * _0_5, yy * _0_5, 0);
--- a/hedgewars/uGears.pas	Tue Aug 11 21:51:36 2009 +0000
+++ b/hedgewars/uGears.pas	Wed Aug 12 09:43:05 2009 +0000
@@ -237,13 +237,15 @@
                 Result^.Radius:= 4;
                 Result^.Elasticity:= _0_6;
                 Result^.Friction:= _0_96;
-                Result^.RenderTimer:= true
+                Result^.RenderTimer:= true;
+                if Result^.Timer = 0 then Result^.Timer:= 3000
                 end;
   gtWatermelon: begin
                 Result^.Radius:= 4;
                 Result^.Elasticity:= _0_8;
                 Result^.Friction:= _0_995;
-                Result^.RenderTimer:= true
+                Result^.RenderTimer:= true;
+                if Result^.Timer = 0 then Result^.Timer:= 3000
                 end;
     gtHedgehog: begin
                 Result^.Radius:= cHHRadius;
@@ -254,7 +256,8 @@
                 end;
 gtAmmo_Grenade: begin
                 Result^.Radius:= 4;
-                Result^.RenderTimer:= true
+                Result^.RenderTimer:= true;
+                if Result^.Timer = 0 then Result^.Timer:= 3000
                 end;
    gtHealthTag: begin
                 Result^.Timer:= 1500;
@@ -376,7 +379,8 @@
                 Result^.Radius:= 4;
                 Result^.Elasticity:= _0_5;
                 Result^.Friction:= _0_96;
-                Result^.RenderTimer:= true
+                Result^.RenderTimer:= true;
+                Result^.Timer:= 5000
                 end;
        gtDrill: begin
                 Result^.Timer:= 5000;
--- a/hedgewars/uWorld.pas	Tue Aug 11 21:51:36 2009 +0000
+++ b/hedgewars/uWorld.pas	Wed Aug 12 09:43:05 2009 +0000
@@ -450,7 +450,7 @@
 
 DrawChat;
 
-if isPaused then DrawCentered(cScreenWidth div 2, cScreenHeight div 2, PauseTexture);
+if isPaused then DrawCentered(0, cScreenHeight div 2, PauseTexture);
 
 inc(Frames);
 if cShowFPS then