Set CurrentAmmoGear on piano (should fix notes again). Also disable focus on current hog if unplaced.
--- 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
--- 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
--- 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;