network: added check if peer_id belongs to local player

This commit is contained in:
Unknown 2018-03-02 21:05:24 +03:00
parent a124f50421
commit 480303b75c

View file

@ -1,4 +1,5 @@
-- @TODO: when recieving maps of other users, check for consistency -- @TODO: when recieving maps of other users, check for consistency
-- @TODO: don't call during suspension
local vmf = get_mod("VMF") local vmf = get_mod("VMF")
local _VMF_USERS = {} local _VMF_USERS = {}
@ -170,7 +171,7 @@ VMFMod.network_send = function (self, rpc_name, recipient, ...)
end end
end end
elseif recipient == "local" then elseif recipient == "local" or recipient == Network.peer_id() then
send_rpc_vmf_data_local(self:get_name(), rpc_name, ...) send_rpc_vmf_data_local(self:get_name(), rpc_name, ...)