sharedstate: don't send unchanged values
This commit is contained in:
parent
3c13cacfc9
commit
ad783d8a7e
@ -183,8 +183,11 @@ function sharedstate.set(key, value)
|
||||
local errormsg="sharedstate: Key " .. key .. " has not been initialized."
|
||||
error(errormsg)
|
||||
end
|
||||
pings.sharedstate_recv(resolve_index(key), value)
|
||||
-- pings.sharedstate_recv_named(key, value)
|
||||
-- don't bother sending unchanged values
|
||||
if value ~= get_value(key) then
|
||||
-- pings.sharedstate_recv(resolve_index(key), value)
|
||||
pings.sharedstate_recv_named(key, value)
|
||||
end
|
||||
end
|
||||
|
||||
---Queue entries for sending
|
||||
|
Loading…
x
Reference in New Issue
Block a user