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."
|
local errormsg="sharedstate: Key " .. key .. " has not been initialized."
|
||||||
error(errormsg)
|
error(errormsg)
|
||||||
end
|
end
|
||||||
pings.sharedstate_recv(resolve_index(key), value)
|
-- don't bother sending unchanged values
|
||||||
-- pings.sharedstate_recv_named(key, value)
|
if value ~= get_value(key) then
|
||||||
|
-- pings.sharedstate_recv(resolve_index(key), value)
|
||||||
|
pings.sharedstate_recv_named(key, value)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
---Queue entries for sending
|
---Queue entries for sending
|
||||||
|
Loading…
x
Reference in New Issue
Block a user