--- a/hedgewars/GSHandlers.inc Sat Jan 22 22:37:12 2011 +0300
+++ b/hedgewars/GSHandlers.inc Sat Jan 22 22:39:35 2011 +0300
@@ -2299,7 +2299,7 @@
2: FollowGear := AddGear(hwRound(Gear^.X), hwRound(Gear^.Y), gtNapalmBomb, 0, cBombsSpeed *
Gear^.Tag, _0, 0);
3: FollowGear := AddGear(hwRound(Gear^.X), hwRound(Gear^.Y), gtDrill, gsttmpFlag, cBombsSpeed *
- Gear^.Tag, _0, 0);
+ Gear^.Tag, _0, Gear^.Timer + 1);
//4: FollowGear := AddGear(hwRound(Gear^.X), hwRound(Gear^.Y), gtWaterMelon, 0, cBombsSpeed *
// Gear^.Tag, _0, 5000);
end;
@@ -2981,6 +2981,7 @@
else if not TestCollisionYWithGear(Gear, hwSign(Gear^.dY)) and not TestCollisionXWithGear(Gear, hwSign(Gear^.dX)) then
begin
StopSound(Gear^.SoundChannel);
+ Gear^.Tag := 1;
Gear^.doStep := @doStepDrill
end;
@@ -3033,8 +3034,20 @@
Gear^.SoundChannel := LoopSound(sndDrillRocket);
Gear^.doStep := @doStepDrillDrilling;
+ if (Gear^.State and gsttmpFlag) <> 0 then
+ gear^.RenderTimer:= true;
dec(Gear^.Timer)
end
+ else if ((Gear^.State and gsttmpFlag) <> 0) and (Gear^.Tag <> 0) then
+ begin
+ if Gear^.Timer = 0 then
+ begin
+ doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 30, Gear^.Hedgehog, EXPLAutoSound);
+ DeleteGear(Gear);
+ end
+ else
+ dec(Gear^.Timer);
+ end;
end;
////////////////////////////////////////////////////////////////////////////////
--- a/hedgewars/HHHandlers.inc Sat Jan 22 22:37:12 2011 +0300
+++ b/hedgewars/HHHandlers.inc Sat Jan 22 22:39:35 2011 +0300
@@ -313,7 +313,7 @@
gtResurrector, 0, _0, _0, 0);
CurAmmoGear^.SoundChannel := LoopSound(sndResurrector);
end;
- amDrillStrike: AddGear(CurWeapon^.Pos, 0, gtAirAttack, 3, _0, _0, 0);
+ amDrillStrike: AddGear(CurWeapon^.Pos, 0, gtAirAttack, 3, _0, _0, CurWeapon^.Timer);
//amMelonStrike: AddGear(CurWeapon^.Pos, 0, gtAirAttack, 4, _0, _0, 0);
end;
--- a/hedgewars/uGears.pas Sat Jan 22 22:37:12 2011 +0300
+++ b/hedgewars/uGears.pas Sat Jan 22 22:39:35 2011 +0300
@@ -427,7 +427,9 @@
gear^.Timer:= 5000
end;
gtDrill: begin
- gear^.Timer:= 5000;
+ if gear^.Timer = 0 then gear^.Timer:= 5000;
+ // Tag for drill strike. if 1 then first impact occured already
+ gear^.Tag := 0;
gear^.Radius:= 4;
gear^.Density:= _1;
end;
--- a/hedgewars/uVariables.pas Sat Jan 22 22:37:12 2011 +0300
+++ b/hedgewars/uVariables.pas Sat Jan 22 22:39:35 2011 +0300
@@ -1926,7 +1926,7 @@
ejectX: 0;
ejectY: 0),
-// Ressurrector
+// Resurrector
(NameId: sidResurrector;
NameTex: nil;
Probability: 0;
@@ -1960,10 +1960,11 @@
ammoprop_NeedTarget or
ammoprop_AttackingPut or
ammoprop_DontHold or
+ ammoprop_Timerable or
ammoprop_NotBorder;
Count: 1;
NumPerTurn: 0;
- Timer: 0;
+ Timer: 5000;
Pos: 0;
AmmoType: amDrillStrike;
AttackVoice: sndIncoming);
@@ -1977,6 +1978,7 @@
PosSprite: sprAmAirplane;
ejectX: 0;
ejectY: 0),
+
// Snowball/Mudball
(NameId: sidSnowball;
NameTex: nil;