Skip to content

Commit

Permalink
Merge pull request #31 from Cody-Spring/master
Browse files Browse the repository at this point in the history
Multiplayer Patch Update
  • Loading branch information
rheirman authored May 4, 2020
2 parents ecb29e0 + a951384 commit ded78cd
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions v1.1/Source/Giddy-up-Core/ModExtensions/MultiplayerPatch.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Reflection.Emit;
Expand Down Expand Up @@ -49,26 +49,23 @@ static void ExtendedDataStoragePostfix()

static void GetExtendedDataForPostfix(Pawn pawn, object __result)
{
if (forward.ContainsKey(pawn))
if (!forward.ContainsKey(pawn))
{
return;
}
forward.Add(pawn, __result);
if (backward.ContainsKey(pawn))
forward.Add(pawn, __result);
}
if (!backward.ContainsKey(__result))
{
return;
backward.Add(__result, pawn);
}
backward.Add(__result, pawn);
}

static void DeleteExtendedDataForPostfix(Pawn pawn)
{
if (!forward.ContainsKey(pawn))
if (forward.ContainsKey(pawn))
{
return;
backward.Remove(forward[pawn]);
forward.Remove(pawn);
}
backward.Remove(forward[pawn]);
forward.Remove(pawn);
}

static void ExtendedPawnData(SyncWorker sync, ref object obj)
Expand Down

0 comments on commit ded78cd

Please sign in to comment.