From 87f8821bf6eb3718582837afad5f34b1c9230bff Mon Sep 17 00:00:00 2001 From: Mustafa Alperen Seki Date: Sat, 6 Apr 2024 14:48:38 +0300 Subject: [PATCH] Don't check for the type if it is not defined. --- .../Traits/Conditions/GrantTimedConditionOnTeleport.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenRA.Mods.AS/Traits/Conditions/GrantTimedConditionOnTeleport.cs b/OpenRA.Mods.AS/Traits/Conditions/GrantTimedConditionOnTeleport.cs index 926dc4fc5b37..2c0c4e6a0333 100644 --- a/OpenRA.Mods.AS/Traits/Conditions/GrantTimedConditionOnTeleport.cs +++ b/OpenRA.Mods.AS/Traits/Conditions/GrantTimedConditionOnTeleport.cs @@ -96,7 +96,7 @@ void ITick.Tick(Actor self) void IOnSuccessfulTeleportRA2.OnSuccessfulTeleport(string type, WPos oldPos, WPos newPos) { - if (Info.TeleportTypes.Contains(type)) + if (Info.TeleportTypes.Count != 0 && Info.TeleportTypes.Contains(type)) GrantCondition(self, info.Condition); }