From 5c4ec1bf0e9e067d53b276f20cd364861b063244 Mon Sep 17 00:00:00 2001 From: abcdefg30 Date: Fri, 7 Feb 2020 13:16:21 +0100 Subject: [PATCH] Fix a crash when a SourceActor does not occupy space --- OpenRA.Game/GameRules/WeaponInfo.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OpenRA.Game/GameRules/WeaponInfo.cs b/OpenRA.Game/GameRules/WeaponInfo.cs index 5902d0fd53..31aa4d975c 100644 --- a/OpenRA.Game/GameRules/WeaponInfo.cs +++ b/OpenRA.Game/GameRules/WeaponInfo.cs @@ -219,11 +219,13 @@ namespace OpenRA.GameRules var args = new WarheadArgs { Weapon = this, - Source = firedBy.CenterPosition, SourceActor = firedBy, WeaponTarget = target }; + if (firedBy.OccupiesSpace != null) + args.Source = firedBy.CenterPosition; + Impact(target, args); } }