Lots of work on debugging diff xmit
This commit is contained in:
@@ -233,7 +233,6 @@ static bool worlds_identical(const UniqueWorld &w1, const UniqueWorld &w2) {
|
||||
return sbw1.contents_equal(&sbw2);
|
||||
}
|
||||
|
||||
|
||||
LuaDefine(unittests_world1animdiff, "c") {
|
||||
UniqueWorld m(new World(util::WORLD_TYPE_MASTER));
|
||||
UniqueWorld ss(new World(util::WORLD_TYPE_S_SYNC));
|
||||
@@ -256,7 +255,7 @@ LuaDefine(unittests_world1animdiff, "c") {
|
||||
|
||||
// Now difference transmit all that to the client.
|
||||
ss->diff_visible(ids, m.get(), &sb);
|
||||
cs->patch_visible(&sb);
|
||||
cs->patch_visible(&sb, nullptr);
|
||||
LuaAssertStrEq(L, ss->tangible_ids_debug_string(), "123,345");
|
||||
LuaAssertStrEq(L, ss->tangible_anim_debug_string(123),
|
||||
"id=0 action= plane=somewhere x=0 y=0 z=0 facing=0 graphic=; "
|
||||
@@ -280,7 +279,7 @@ LuaDefine(unittests_world1animdiff, "c") {
|
||||
|
||||
// Now difference transmit all that to the client again.
|
||||
ss->diff_visible(ids, m.get(), &sb);
|
||||
cs->patch_visible(&sb);
|
||||
cs->patch_visible(&sb, nullptr);
|
||||
LuaAssertStrEq(L, ss->tangible_anim_debug_string(123),
|
||||
"id=0 action= plane=somewhere x=0 y=0 z=0 facing=0 graphic=; "
|
||||
"id=770 action=walkto x=3 y=4; "
|
||||
@@ -297,7 +296,7 @@ LuaDefine(unittests_world1animdiff, "c") {
|
||||
|
||||
// And difference transmit
|
||||
ss->diff_visible(ids, m.get(), &sb);
|
||||
cs->patch_visible(&sb);
|
||||
cs->patch_visible(&sb, nullptr);
|
||||
LuaAssertStrEq(L, ss->tangible_ids_debug_string(), "123");
|
||||
LuaAssert(L, worlds_identical(ss, cs));
|
||||
|
||||
@@ -394,7 +393,7 @@ LuaDefine(unittests_world3diffluatab, "c") {
|
||||
|
||||
// Difference transmit.
|
||||
ss->diff_luatabs(123, m.get(), &sb);
|
||||
cs->patch_luatabs(&sb);
|
||||
cs->patch_luatabs(&sb, nullptr);
|
||||
|
||||
// Verify that the data was transmitted.
|
||||
LuaAssertStrEq(L, ss->tangible_pprint(123), expect_123);
|
||||
@@ -423,7 +422,7 @@ LuaDefine(unittests_world4difftanclass, "c") {
|
||||
|
||||
// Difference transmit.
|
||||
ss->diff_tanclass(123, m.get(), &sb);
|
||||
cs->patch_tanclass(&sb);
|
||||
cs->patch_tanclass(&sb, nullptr);
|
||||
|
||||
// Verify that the data was transmitted.
|
||||
LuaAssertStrEq(L, ss->tangible_get_class(123), "chicken");
|
||||
@@ -436,7 +435,7 @@ LuaDefine(unittests_world4difftanclass, "c") {
|
||||
|
||||
// Difference transmit.
|
||||
ss->diff_tanclass(123, m.get(), &sb);
|
||||
cs->patch_tanclass(&sb);
|
||||
cs->patch_tanclass(&sb, nullptr);
|
||||
|
||||
// Verify that the data was transmitted.
|
||||
LuaAssertStrEq(L, ss->tangible_get_class(123), "");
|
||||
|
||||
Reference in New Issue
Block a user