diff --git a/sharedstate.lua b/sharedstate.lua index b2fd1aa..3243680 100644 --- a/sharedstate.lua +++ b/sharedstate.lua @@ -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