diff -r 9bbf8af42ace -r 41d3afaa20c7 hedgewars/HHHandlers.inc --- a/hedgewars/HHHandlers.inc Fri May 01 11:58:22 2009 +0000 +++ b/hedgewars/HHHandlers.inc Sun May 03 17:35:10 2009 +0000 @@ -150,6 +150,7 @@ PlaySound(sndLaugh, false, CurrentTeam^.voicepack) end; amDEagle: CurAmmoGear:= AddGear(hwRound(X + xx * cHHRadius), hwRound(Y + yy * cHHRadius), gtDEagleShot, 0, xx * _0_5, yy * _0_5, 0); + amSniperRifle: CurAmmoGear:= AddGear(hwRound(X + xx * cHHRadius), hwRound(Y + yy * cHHRadius), gtSniperRifleShot, 0, xx * _0_5, yy * _0_5, 0); amDynamite: begin AddGear(hwRound(X) + hwSign(dX) * 7, hwRound(Y), gtDynamite, 0, SignAs(_0_03, dX), _0, 5000); PlaySound(sndLaugh, false, CurrentTeam^.voicepack) @@ -185,8 +186,6 @@ amBallgun: CurAmmoGear:= AddGear(hwRound(X), hwRound(Y), gtBallgun, 0, xx * _0_5, yy * _0_5, 0); amLowGravity: cGravity:= cMaxWindSpeed / 2; amExtraDamage: cDamageModifier:= _1_5; - //this flag unfortunately gets cleared too often for true invulnerability, although it seemed like the natural choice - //amInvulnerable: State:= State or gstNoDamage; amInvulnerable: Invulnerable:= true; amExtraTime: TurnTimeLeft:= TurnTimeLeft + 30000; amLaserSight: cLaserSighting:= true; @@ -397,8 +396,7 @@ or TestCollisionYwithGear(Gear, -1)) then Gear^.Y:= Gear^.Y - _1; end; - // ARTILLERY HERE - if not TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) then Gear^.X:= Gear^.X + SignAs(_1, Gear^.dX); + if (not cArtillery) and (not TestCollisionXwithGear(Gear, hwSign(Gear^.dX))) then Gear^.X:= Gear^.X + SignAs(_1, Gear^.dX); SetAllHHToActive; if not TestCollisionYwithGear(Gear, 1) then @@ -628,7 +626,7 @@ begin Gear^.State:= Gear^.State or gstHHHJump or gstMoving; Gear^.dY:= -_0_25; - Gear^.dX:= -SignAs(_0_02, Gear^.dX); + if not cArtillery then Gear^.dX:= -SignAs(_0_02, Gear^.dX); PlaySound(sndJump2, false, PHedgehog(Gear^.Hedgehog)^.Team^.voicepack) end;