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
1 file changed
+3 -7
+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;
}
}