Trololarion

Problem with PlayerController

Recommended Posts

Trololarion    5

I made a client mod that successfully works on the client, but does not work on the host, so I modified the SendRPCToServer function locally and made it call RPC_HANDLERS, everything works fine until the moment when "RightClick" is simulated, it calls the method of the PlayerController component and I think the problem is in it, maybe you have any guesses?

 

local UpvalueHacker=require("upvaluehacker")
local RPC_HANDLERS=UpvalueHacker.GetUpvalue(SendRPCToServer, "RPC_HANDLERS")
local function DoRPC(code,...)
    if GLOBAL.TheWorld.ismastersim then
        RPC_HANDLERS[code](GLOBAL.ThePlayer,...)
    else
        SendRPCToServer(code,...)
    end
end

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now