# HG changeset patch # User nemo # Date 1320603462 18000 # Node ID 3036c242b19d78f0c794ac5b2b802c9a8a1343a1 # Parent 3edb3c857995575f288be84a11c338012544f9dd Set CurrentAmmoGear on piano (should fix notes again). Also disable focus on current hog if unplaced. diff -r 3edb3c857995 -r 3036c242b19d hedgewars/GSHandlers.inc --- a/hedgewars/GSHandlers.inc Sun Nov 06 13:00:25 2011 -0500 +++ b/hedgewars/GSHandlers.inc Sun Nov 06 13:17:42 2011 -0500 @@ -4403,9 +4403,9 @@ odY: hwFloat; begin AllInactive := false; - if (CurrentHedgehog <> nil) and (CurrentHedgehog^.Gear <> nil) and ((CurrentHedgehog^.Gear^. - Message and gmSlot) <> 0) then - begin + if (CurrentHedgehog <> nil) and (CurrentHedgehog^.Gear <> nil) and + ((CurrentHedgehog^.Gear^.Message and gmSlot) <> 0) then + begin case CurrentHedgehog^.Gear^.MsgParam of 0: PlaySound(sndPiano0); 1: PlaySound(sndPiano1); @@ -4420,7 +4420,7 @@ AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtNote); CurrentHedgehog^.Gear^.MsgParam := 0; CurrentHedgehog^.Gear^.Message := CurrentHedgehog^.Gear^.Message and not gmSlot; - end; + end; if (*((Gear^.Pos = 3) and ((GameFlags and gfSolidLand) <> 0)) or*) (Gear^.Pos = 5) then // bounce up to 10 times (3 times on gameflagged solid land) before dropping past landscape diff -r 3edb3c857995 -r 3036c242b19d hedgewars/HHHandlers.inc --- a/hedgewars/HHHandlers.inc Sun Nov 06 13:00:25 2011 -0500 +++ b/hedgewars/HHHandlers.inc Sun Nov 06 13:17:42 2011 -0500 @@ -356,8 +356,7 @@ amBazooka, amSnowball, amBee, amSMine, amMortar, amWatermelon, - amHellishBomb, amDrill, - amPiano: FollowGear:= newGear; + amHellishBomb, amDrill: FollowGear:= newGear; amShotgun, amPickHammer, amRope, amDEagle, @@ -372,7 +371,7 @@ amJetpack, amBirdy, amFlamethrower, amLandGun, amResurrector, amStructure, - amTardis: CurAmmoGear:= newGear; + amTardis, amPiano: CurAmmoGear:= newGear; end; if (CurAmmoType = amMine) or (CurAmmoType = amSMine) and (GameFlags and gfInfAttack <> 0) then newGear^.FlightTime:= GameTicks + 1000; if Ammoz[CurAmmoType].Ammo.Propz and ammoprop_NeedTarget <> 0 then diff -r 3edb3c857995 -r 3036c242b19d hedgewars/uCommandHandlers.pas --- a/hedgewars/uCommandHandlers.pas Sun Nov 06 13:00:25 2011 -0500 +++ b/hedgewars/uCommandHandlers.pas Sun Nov 06 13:17:42 2011 -0500 @@ -527,7 +527,7 @@ else begin AddCaption('Auto Camera On', $CCCCCC, capgrpVolume); bShowFinger:= true; - FollowGear:= CurrentHedgehog^.Gear; + if not CurrentHedgehog^.Unplaced then FollowGear:= CurrentHedgehog^.Gear; autoCameraOn:= true end end;