Skip to content

Commit

Permalink
fix: fixing errror meessage for server client attributes (#953)
Browse files Browse the repository at this point in the history
previous error says it is called on client, but that is not what happens. It is instead called when server is not active
  • Loading branch information
James-Frowen committed Oct 1, 2021
1 parent 69f5ec1 commit 53cf60b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Assets/Mirage/Weaver/Processors/AttributeProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ static bool IgnoreMethod(MethodDefinition md)

void ProcessMethodAttributes(MethodDefinition md, FoundType foundType)
{
InjectGuard<ServerAttribute>(md, foundType, IsServer, "[Server] function '{0}' called on client");
InjectGuard<ClientAttribute>(md, foundType, IsClient, "[Client] function '{0}' called on server");
InjectGuard<ServerAttribute>(md, foundType, IsServer, "[Server] function '{0}' called when server not active");
InjectGuard<ClientAttribute>(md, foundType, IsClient, "[Client] function '{0}' called when client not active");
InjectGuard<HasAuthorityAttribute>(md, foundType, HasAuthority, "[Has Authority] function '{0}' called on player without authority");
InjectGuard<LocalPlayerAttribute>(md, foundType, IsLocalPlayer, "[Local Player] function '{0}' called on nonlocal player");
CheckAttribute<ServerRpcAttribute>(md, foundType);
Expand Down

0 comments on commit 53cf60b

Please sign in to comment.