Closed SaladDais closed 3 years ago
VOCache is only written when leaving a region, so mapping across all viewers' VOCaches and looking for a (region_handle, local_id, crc)
match would work fine for our purposes with relatively unlikely race conditions.
Whenever the viewer enters a sim, the sim will send cache probes with
ObjectUpdateCached
containing a LocalID and CRC. If the LocalID isn't cached or there's a CRC mismatch the viewer will request it withRequestMultipleObjects
. Right now the proxy doesn't know about any objects that the viewer didn't request due to them being present in its own viewer object cache.Right now we hack around this in a few places by always requesting missing objects when they're referenced in an ObjectSelect packet, but it can cause problems if you're trying to look at avatar positions and the avatar sits on an object the proxy doesn't know about. Object positions are always relative to their parent, so not knowing the parent's position makes it hard to determine the avatar's position.
Possible approaches:
VOCACHE_IS_EMPTY
flag inRegionHandshakeReply
so cache probes don't get sent, and the sim will always send fullObjectUpdate
s instead. This is the least brittle, but most wasteful because the sim always has to send ObjectUpdates for objects your viewer may have cached.ObjectManager
onObjectUpdateCached
LocalID + CRC match. Might be brittle, and I don't know if vocache supports concurrent reads & writes well. Discovering viewer cache locations is also a problem.