From ac921628251a2c7fb9f8ecb058d9760196cdc84e Mon Sep 17 00:00:00 2001 From: dnqbob Date: Fri, 21 Oct 2022 21:57:43 +0800 Subject: [PATCH] Weapon checks valid frozen actor --- OpenRA.Game/GameRules/WeaponInfo.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OpenRA.Game/GameRules/WeaponInfo.cs b/OpenRA.Game/GameRules/WeaponInfo.cs index 6f8b9c0599..d5fef32eec 100644 --- a/OpenRA.Game/GameRules/WeaponInfo.cs +++ b/OpenRA.Game/GameRules/WeaponInfo.cs @@ -220,6 +220,9 @@ namespace OpenRA.GameRules /// Checks if the weapon is valid against (can target) the frozen actor. public bool IsValidAgainst(FrozenActor victim, Actor firedBy) { + if (!victim.IsValid) + return false; + if (!CanTargetSelf && victim.Actor == firedBy) return false;