From 9e659cacf2c5578952cebe01aef74432cb39e894 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Thu, 4 May 2023 19:08:13 +0200 Subject: [PATCH] Fix rally point sprites not being truely optional. --- OpenRA.Mods.Common/Effects/RallyPointIndicator.cs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/OpenRA.Mods.Common/Effects/RallyPointIndicator.cs b/OpenRA.Mods.Common/Effects/RallyPointIndicator.cs index 6c591afd3c..102d0f62b3 100644 --- a/OpenRA.Mods.Common/Effects/RallyPointIndicator.cs +++ b/OpenRA.Mods.Common/Effects/RallyPointIndicator.cs @@ -34,11 +34,17 @@ namespace OpenRA.Mods.Common.Effects if (rp.Info.Image != null) { - flag = new Animation(building.World, rp.Info.Image); - flag.PlayRepeating(rp.Info.FlagSequence); + if (rp.Info.FlagSequence != null) + { + flag = new Animation(building.World, rp.Info.Image); + flag.PlayRepeating(rp.Info.FlagSequence); + } - circles = new Animation(building.World, rp.Info.Image); - circles.Play(rp.Info.CirclesSequence); + if (rp.Info.CirclesSequence != null) + { + circles = new Animation(building.World, rp.Info.Image); + circles.Play(rp.Info.CirclesSequence); + } } UpdateTargetLineNodes(building.World);