Revert "In RemoveCellsFromPlayerShroud, don't call RemoveSource unless required."

This reverts commit 86b9227577.

This commit relied on the relationship not changing, but when a player is defeated their relationship can change due to becoming a spectator. This can cause a crash if the shroud is not removed. Revert the commit to resolve this crash.
This commit is contained in:
RoosterDragon
2025-11-22 13:06:24 +00:00
committed by Gustas Kažukauskas
parent 89a4823a83
commit ba632fbf8b
4 changed files with 8 additions and 32 deletions

View File

@@ -49,13 +49,7 @@ namespace OpenRA.Mods.Common.Effects
p.Shroud.AddSource(this, sourceType, uv);
}
void RemoveCellsFromPlayerShroud(Player p)
{
if (!validStances.HasRelationship(player.RelationshipWith(p)))
return;
p.Shroud.RemoveSource(this);
}
void RemoveCellsFromPlayerShroud(Player p) { p.Shroud.RemoveSource(this); }
PPos[] ProjectedCells(World world)
{