SmartlyDressedGames / Legally-Distinct-Missile

Fork of Rocket for Unturned maintained by the game developers.
MIT License
79 stars 29 forks source link

Potential additional backwards compatibility? #77

Closed JonnygamingTv closed 1 month ago

JonnygamingTv commented 1 month ago

I noticed that you changed

public static void ReceiveSingleBarricade(in ClientInvocationContext context, NetId parentNetId, Guid assetId, byte[] state, Vector3 point, byte angle_x, byte angle_y, byte angle_z, ulong owner, ulong group, NetId netId)

public static void ReceiveSingleStructure(byte x, byte y, Guid id, Vector3 point, byte angle_x, byte angle_y, byte angle_z, ulong owner, ulong group, NetId netId)

to

public static void ReceiveSingleBarricade(in ClientInvocationContext context, NetId parentNetId, Guid assetId, byte[] state, Vector3 point, Quaternion rotation, ulong owner, ulong group, NetId netId)

public static void ReceiveSingleStructure(byte x, byte y, Guid id, Vector3 point, Quaternion rotation, ulong owner, ulong group, NetId netId)

(SDG.Unturned.BarricadeManager.ReceiveSingleBarricade and SDG.Unturned.StructureManager.ReceiveSingleStructure)

Would it be plausible to do something like below for additional backwards (e.g. AviRockets) compatibility?:

        // Token: 0x06002C81 RID: 11393 RVA: 0x000C4C14 File Offset: 0x000C2E14
        [SteamCall(ESteamCallValidation.ONLY_FROM_SERVER)]
        public static void ReceiveSingleBarricade(in ClientInvocationContext context, NetId parentNetId, Guid assetId, byte[] state, Vector3 point, byte angle_x, byte angle_y, byte angle_z, ulong owner, ulong group, NetId netId)
        {
                    Quaternion rotation = Quaternion.Euler(angle_x, angle_y, angle_z);
                    ReceiveSingleBarricade(in context, parentNetId, assetId, state, point, rotation, owner, group, netId);
        }
        // Token: 0x06002F8F RID: 12175 RVA: 0x000D4110 File Offset: 0x000D2310
        [SteamCall(ESteamCallValidation.ONLY_FROM_SERVER, legacyName = "tellStructure")]
        public static void ReceiveSingleStructure(byte x, byte y, Guid id, Vector3 point, byte angle_x, byte angle_y, byte angle_z, ulong owner, ulong group, NetId netId)
        {
                    Quaternion rotation = Quaternion.Euler(angle_x, angle_y, angle_z);
                    ReceiveSingleStructure(x, y, id, point, rotation, owner, group, netId);
        }
SDGNelson commented 1 month ago

Sorry, but we don't officially support patching RPCs. Even if the old version of those methods remained it wouldn't be called by the game.