# HG changeset patch # User nemo # Date 1350442668 14400 # Node ID 6ab7307fcec30ff3b771fcd733603a0e1da1542f # Parent d2fd8040534fe9824265cdb2e730e9bf0221bb2d I like this condition for home run better diff -r d2fd8040534f -r 6ab7307fcec3 hedgewars/uGearsHedgehog.pas --- a/hedgewars/uGearsHedgehog.pas Tue Oct 16 22:35:01 2012 +0400 +++ b/hedgewars/uGearsHedgehog.pas Tue Oct 16 22:57:48 2012 -0400 @@ -968,12 +968,12 @@ if (CurrentHedgehog^.Gear = Gear) then isCursorVisible:= false end; -// IMO this should trigger homerun based on leftX/rightX + someval instead - that is 'knocking it out of the park' if (not isZero(Gear^.dY)) and (Gear^.FlightTime > 0) and ((GameFlags and gfLowGravity) = 0) then begin inc(Gear^.FlightTime); - if Gear^.FlightTime = 3000 then + if (Gear^.FlightTime > 1500) and ((hwRound(Gear^.X) < leftX-250) or (hwRound(Gear^.X) > rightX+250)) then begin + Gear^.FlightTime:= 0; AddCaption(GetEventString(eidHomerun), cWhiteColor, capgrpMessage); PlaySound(sndHomerun) end;