Skip to content

Commit

Permalink
Exclude Spectator faction from FactionRepeater
Browse files Browse the repository at this point in the history
This should fix the issues with extra missions generating (and often causing errors) due to the game trying to generate them for the Spectator faction.
  • Loading branch information
SokyranTheDragon committed Aug 5, 2024
1 parent f0221d0 commit d1ec783
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Source/Client/Factions/FactionRepeater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,13 @@ public static bool Template<T>(IDictionary<int, T> factionIdToData, Action<T> da
{
if (Multiplayer.Client == null || ignore) return true;

var spectatorId = Multiplayer.WorldComp.spectatorFaction.loadID;
ignore = true;
foreach (var (id, data) in factionIdToData)
{
if (id == spectatorId)
continue;

map.PushFaction(id);
try
{
Expand Down

0 comments on commit d1ec783

Please sign in to comment.