Skip to content

Commit 2379b76

Browse files
GarethPikPokTwoTenPvP
authored andcommitted
Fixed incorrect stream usage in NetworkedBehaviour (#295)
The code previously was not doing what the comment implied - it was sending the current stream, not the shortened stream containing only user data. This effectively meant that the else block was redundant and adding additional overhead.
1 parent 06ce0ad commit 2379b76

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

MLAPI/Messaging/ReflectionMethod.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,11 @@ internal object Invoke(NetworkedBehaviour target, ulong senderClientId, Stream s
103103

104104
if (useDelegate)
105105
{
106-
return InvokeDelegate(target, senderClientId, stream);
106+
return InvokeDelegate(target, senderClientId, userStream);
107107
}
108108
else
109109
{
110-
return InvokeReflected(target, stream);
110+
return InvokeReflected(target, userStream);
111111
}
112112
}
113113
}

0 commit comments

Comments
 (0)