mirror of
https://github.com/NuclearPowered/Reactor.git
synced 2026-10-19 15:51:54 +00:00
Fix bug (bad code) in SpawnGameDataMessage patch
This commit is contained in:
1 parent
db452bf7e4
commit
3229475361
5 files changed
+7
-11
No files matched your search
@@ -1143,4 +1143,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -908,4 +908,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -908,4 +908,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -902,4 +902,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user