Fix Aircraft not updating influence when changing height

Occupied cells was defined by height yet we didn't update actor map on changing height. This in some scenarios could have caused the aircraft to forget to remove its influence from actor map
This commit is contained in:
Gustas
2022-10-14 12:56:40 +03:00
committed by Matthias Mailänder
parent f612d82797
commit 57143087d7
2 changed files with 26 additions and 12 deletions

View File

@@ -34,6 +34,9 @@ namespace OpenRA.Mods.Common.Activities
// We are taking off, so remove influence in ground cells.
aircraft.RemoveInfluence();
if (self.World.Map.DistanceAboveTerrain(aircraft.CenterPosition).Length > aircraft.Info.MinAirborneAltitude)
return;
if (aircraft.Info.TakeoffSounds.Length > 0)
Game.Sound.Play(SoundType.World, aircraft.Info.TakeoffSounds, self.World, aircraft.CenterPosition);