Skip to content

Commit

Permalink
Fixed problem with hidden pawns being added to the world when they ar…
Browse files Browse the repository at this point in the history
…e already there.
  • Loading branch information
edbmods committed Aug 5, 2018
1 parent 0ee2274 commit 420c0ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/Controller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ protected void AddPawnToWorld(CustomPawn pawn) {
}

// Don't add pawns to the world if they have already been added.
if (Find.GameInitData.startingAndOptionalPawns.Contains(pawn.Pawn)) {
if (Find.World.worldPawns.Contains(pawn.Pawn) || Find.GameInitData.startingAndOptionalPawns.Contains(pawn.Pawn)) {
return;
}
else {
Expand Down

0 comments on commit 420c0ca

Please sign in to comment.