add the takeoff and landing sound
This commit is contained in:
@@ -21,6 +21,7 @@ namespace OpenRA.Mods.Common.Activities
|
||||
readonly Target target;
|
||||
readonly WDist maxRange;
|
||||
readonly WDist minRange;
|
||||
bool playedSound;
|
||||
|
||||
public HeliFly(Actor self, Target t)
|
||||
{
|
||||
@@ -53,6 +54,12 @@ namespace OpenRA.Mods.Common.Activities
|
||||
if (IsCanceled || !target.IsValidFor(self))
|
||||
return NextActivity;
|
||||
|
||||
if (!playedSound && helicopter.Info.TakeoffSound != null && self.IsAtGroundLevel())
|
||||
{
|
||||
Sound.Play(helicopter.Info.TakeoffSound);
|
||||
playedSound = true;
|
||||
}
|
||||
|
||||
if (AdjustAltitude(self, helicopter, helicopter.Info.CruiseAltitude))
|
||||
return this;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user