Get rid of Rpc02 SyncSettings

This RPC is still sent by clients, but no longer used by clients. As the
server can get the info it wants from LogicOptions instead, remove this
RPC to prevent people from using it accidentally
This commit is contained in:
miniduikboot committed 2023-11-29 22:14:59 +01:00
1 parent e303065688
commit 2c12623a65
3 files changed
+2 -27

No files matched your search

@@ -1,5 +1,4 @@
using Impostor.Api.Games;
using Impostor.Api.Net.Messages.Rpcs;
namespace Impostor.Api.Events
{
@@ -18,8 +17,7 @@ namespace Impostor.Api.Events
public enum ChangeReason
{
/// <summary>
/// The options were changed by the host using
/// <see cref="Rpc02SyncSettings"/>.
/// The options were changed by the host using LogicOptions deserialization.
/// </summary>
/// <remarks>
/// This event does not change the message sent to other players,
@@ -1,22 +0,0 @@
using Impostor.Api.Innersloth.GameOptions;
namespace Impostor.Api.Net.Messages.Rpcs
{
public static class Rpc02SyncSettings
{
public static void Serialize(IMessageWriter writer, IGameOptions gameOptionsData)
{
GameOptionsFactory.Serialize(writer, gameOptionsData);
}
public static void Deserialize(IMessageReader reader, out IGameOptions gameOptionsData)
{
gameOptionsData = GameOptionsFactory.Deserialize(reader);
}
public static void DeserializeInto(IMessageReader reader, IGameOptions gameOptionsData)
{
GameOptionsFactory.DeserializeInto(reader, gameOptionsData);
}
}
}
@@ -15,7 +15,6 @@ using Impostor.Api.Net.Inner;
using Impostor.Api.Net.Inner.Objects;
using Impostor.Api.Net.Messages.Rpcs;
using Impostor.Api.Utils;
using Impostor.Server.Events;
using Impostor.Server.Events.Player;
using Impostor.Server.Net.Inner.Objects.Components;
using Impostor.Server.Net.State;
@@ -142,7 +141,7 @@ namespace Impostor.Server.Net.Inner.Objects
return false;
}
Rpc02SyncSettings.DeserializeInto(reader, Game.Options);
// Clients no longer handle this packet since 2022.12.8 but continue to send it
break;
}