Fix bug (bad code) in SpawnGameDataMessage patch

This commit is contained in:
XtraCube committed 2025-05-21 15:23:14 -04:00
1 parent db452bf7e4
commit 3229475361
5 files changed
+7 -11

No files matched your search

+1 -1
View File
@@ -1143,4 +1143,4 @@
}
}
}
}
}
+1 -1
View File
@@ -908,4 +908,4 @@
}
}
}
}
}
+1 -1
View File
@@ -908,4 +908,4 @@
}
}
}
}
}
+3 -7
View File
@@ -238,13 +238,13 @@ internal static class ClientPatches
}
[HarmonyPatch(typeof(SpawnGameDataMessage), nameof(SpawnGameDataMessage.SerializeValues))]
public static class WriteSpawnMessagePatch
public static class SpawnGameDataMessagePatch
{
public static bool Prefix(SpawnGameDataMessage __instance, MessageWriter msg)
public static void Postfix(SpawnGameDataMessage __instance, MessageWriter msg)
{
if (ReactorConnection.Instance!.Syncer != Syncer.Host)
{
return true;
return;
}
// PATCH - Inject ReactorHandshakeS2C
@@ -254,10 +254,6 @@ internal static class ClientPatches
ReactorHeader.Write(msg);
ModdedHandshakeS2C.Serialize(msg, "Among Us", Application.version, 0); // TODO
}
msg.EndMessage();
return false;
}
}
+1 -1
View File
@@ -902,4 +902,4 @@
}
}
}
}
}