Lots of progress on octrees
This commit is contained in:
@@ -3,8 +3,8 @@
|
||||
|
||||
util::IdVector World::get_visible_union(int64_t actor_id, World *master) {
|
||||
return util::sort_union_id_vectors(
|
||||
master->get_near_unsorted(actor_id, RadiusVisibility, true, false),
|
||||
get_near_unsorted(actor_id, RadiusVisibility, true, false));
|
||||
master->get_near(actor_id, RadiusVisibility, true, false, false),
|
||||
get_near(actor_id, RadiusVisibility, true, false, false));
|
||||
}
|
||||
|
||||
int64_t World::patch_actor(StreamBuffer *sb, DebugCollector *dbc) {
|
||||
@@ -169,7 +169,7 @@ void World::patch_luatabs(StreamBuffer *sb, DebugCollector *dbc) {
|
||||
int64_t actor_id = sb->read_int64();
|
||||
util::HashValue closehash = sb->read_hashvalue();
|
||||
int ncreate = sb->read_int32();
|
||||
util::IdVector closetans = get_near(actor_id, RadiusClose, true, false);
|
||||
util::IdVector closetans = get_near(actor_id, RadiusClose, true, false, true);
|
||||
assert(closehash == util::hash_id_vector(closetans));
|
||||
number_lua_tables(closetans);
|
||||
create_new_tables(ncreate);
|
||||
@@ -183,8 +183,8 @@ void World::diff_luatabs(int64_t actor_id, World *master, StreamBuffer *xsb) {
|
||||
StreamBuffer tsb;
|
||||
|
||||
// Calculate the set of close tangibles.
|
||||
util::IdVector closetans = master->get_near(actor_id, RadiusClose, true, false);
|
||||
assert(get_near(actor_id, RadiusClose, true, false) == closetans);
|
||||
util::IdVector closetans = master->get_near(actor_id, RadiusClose, true, false, true);
|
||||
assert(get_near(actor_id, RadiusClose, true, false, true) == closetans);
|
||||
util::HashValue closehash = util::hash_id_vector(closetans);
|
||||
|
||||
// Number and pair tables in the synchronous and master model.
|
||||
@@ -250,7 +250,7 @@ void World::diff_tanclass(int64_t actor_id, World *master, StreamBuffer *xsb) {
|
||||
|
||||
// Calculate the set of close tangibles.
|
||||
// TODO: we've already calculated this in an earlier function. This is wasteful.
|
||||
util::IdVector closetans = master->get_near(actor_id, RadiusClose, true, false);
|
||||
util::IdVector closetans = master->get_near(actor_id, RadiusClose, true, false, true);
|
||||
|
||||
tsb.write_int32(0);
|
||||
int write_count_after = tsb.total_writes();
|
||||
|
||||
Reference in New Issue
Block a user