mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
breaking: componentIndex changed to byte in CommandMessage and RpcMessage (#2963)
This commit is contained in:
parent
7bc7b31df4
commit
e6e910916e
@ -27,7 +27,7 @@ public enum SceneOperation : byte
|
||||
public struct CommandMessage : NetworkMessage
|
||||
{
|
||||
public uint netId;
|
||||
public int componentIndex;
|
||||
public byte componentIndex;
|
||||
public int functionHash;
|
||||
// the parameters for the Cmd function
|
||||
// -> ArraySegment to avoid unnecessary allocations
|
||||
@ -37,7 +37,7 @@ public struct CommandMessage : NetworkMessage
|
||||
public struct RpcMessage : NetworkMessage
|
||||
{
|
||||
public uint netId;
|
||||
public int componentIndex;
|
||||
public byte componentIndex;
|
||||
public int functionHash;
|
||||
// the parameters for the Cmd function
|
||||
// -> ArraySegment to avoid unnecessary allocations
|
||||
|
@ -228,7 +228,7 @@ protected void SendCommandInternal(Type invokeClass, string cmdName, NetworkWrit
|
||||
CommandMessage message = new CommandMessage
|
||||
{
|
||||
netId = netId,
|
||||
componentIndex = ComponentIndex,
|
||||
componentIndex = (byte)ComponentIndex,
|
||||
// type+func so Inventory.RpcUse != Equipment.RpcUse
|
||||
functionHash = RemoteCallHelper.GetMethodHash(invokeClass, cmdName),
|
||||
// segment to avoid reader allocations
|
||||
@ -263,7 +263,7 @@ protected void SendRPCInternal(Type invokeClass, string rpcName, NetworkWriter w
|
||||
RpcMessage message = new RpcMessage
|
||||
{
|
||||
netId = netId,
|
||||
componentIndex = ComponentIndex,
|
||||
componentIndex = (byte)ComponentIndex,
|
||||
// type+func so Inventory.RpcUse != Equipment.RpcUse
|
||||
functionHash = RemoteCallHelper.GetMethodHash(invokeClass, rpcName),
|
||||
// segment to avoid reader allocations
|
||||
@ -310,7 +310,7 @@ protected void SendTargetRPCInternal(NetworkConnection conn, Type invokeClass, s
|
||||
RpcMessage message = new RpcMessage
|
||||
{
|
||||
netId = netId,
|
||||
componentIndex = ComponentIndex,
|
||||
componentIndex = (byte)ComponentIndex,
|
||||
// type+func so Inventory.RpcUse != Equipment.RpcUse
|
||||
functionHash = RemoteCallHelper.GetMethodHash(invokeClass, rpcName),
|
||||
// segment to avoid reader allocations
|
||||
|
Loading…
Reference in New Issue
Block a user