# HG changeset patch # User smxx # Date 1275076131 0 # Node ID 3c65b1d979cdaa583cc07c92cc02db5580af010f # Parent 54ff8cbabaa6010dc9fc7ef30d2b0024897fe3bc Engine: * Fixed aiming for Ballgun and Flamethrower diff -r 54ff8cbabaa6 -r 3c65b1d979cd hedgewars/GSHandlers.inc --- a/hedgewars/GSHandlers.inc Fri May 28 16:21:54 2010 +0000 +++ b/hedgewars/GSHandlers.inc Fri May 28 19:48:51 2010 +0000 @@ -2612,8 +2612,8 @@ dec(Gear^.Timer); HHGear := PHedgehog(Gear^.Hedgehog)^.Gear; HedgehogChAngle(HHGear); - gX := hwRound(Gear^.X); - gY := hwRound(Gear^.Y); + gX := hwRound(Gear^.X) + GetLaunchX(amBallgun, hwSign(HHGear^.dX), HHGear^.Angle); + gY := hwRound(Gear^.Y) + GetLaunchY(amBallgun, HHGear^.Angle); if (Gear^.Timer mod 100) = 0 then begin rx := rndSign(getRandom * _0_1); @@ -3639,8 +3639,8 @@ dec(Gear^.Timer); HHGear := PHedgehog(Gear^.Hedgehog)^.Gear; HedgehogChAngle(HHGear); - gX := hwRound(Gear^.X); - gY := hwRound(Gear^.Y); + gX := hwRound(Gear^.X) + GetLaunchX(amBallgun, hwSign(HHGear^.dX), HHGear^.Angle); + gY := hwRound(Gear^.Y) + GetLaunchY(amBallgun, HHGear^.Angle); if (Gear^.Timer mod 100) = 0 then begin rx := rndSign(getRandom * _0_1); diff -r 54ff8cbabaa6 -r 3c65b1d979cd hedgewars/HHHandlers.inc --- a/hedgewars/HHHandlers.inc Fri May 28 16:21:54 2010 +0000 +++ b/hedgewars/HHHandlers.inc Fri May 28 19:48:51 2010 +0000 @@ -200,7 +200,7 @@ amHellishBomb: FollowGear:= AddGear(hwRound(lx), hwRound(ly), 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(lx), hwRound(ly), gtDrill, 0, xx*Power/cPowerDivisor, yy*Power/cPowerDivisor, 0); - amBallgun: CurAmmoGear:= AddGear(hwRound(lx), hwRound(ly), gtBallgun, 0, xx * _0_5, yy * _0_5, 0); + amBallgun: CurAmmoGear:= AddGear(hwRound(X), hwRound(Y), gtBallgun, 0, xx * _0_5, yy * _0_5, 0); amJetpack: CurAmmoGear:= AddGear(hwRound(lx), hwRound(ly), gtJetpack, 0, _0, _0, 0); amBirdy: begin PlaySound(sndWhistle); @@ -226,7 +226,7 @@ FollowGear:= AddGear(TargetPoint.X, 0, gtPiano, 0, _0, _0, 0); PauseMusic end; - amFlamethrower: CurAmmoGear:= AddGear(hwRound(lx), hwRound(ly), gtFlamethrower, 0, xx * _0_5, yy * _0_5, 0); + amFlamethrower: CurAmmoGear:= AddGear(hwRound(X), hwRound(Y), gtFlamethrower, 0, xx * _0_5, yy * _0_5, 0); end; uStats.AmmoUsed(Ammo^[CurSlot, CurAmmo].AmmoType);