From c6b6f3bc8441f18e143d153f3b2abd230584a917 Mon Sep 17 00:00:00 2001 From: teppy999 Date: Thu, 28 Sep 2023 14:22:33 -0400 Subject: [PATCH] Fix a bug in tangible.build, and add testing code --- luprex/cpp/core/world-accessor.cpp | 2 +- luprex/lua/login.lua | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/luprex/cpp/core/world-accessor.cpp b/luprex/cpp/core/world-accessor.cpp index 6a026888..89e51a31 100644 --- a/luprex/cpp/core/world-accessor.cpp +++ b/luprex/cpp/core/world-accessor.cpp @@ -292,6 +292,7 @@ LuaDefine(tangible_build, "config", LS.rawset(mt, "__index", classtab); tan->anim_queue_.clear(state); + tan->update_plane_item(); return LS.result(); } @@ -831,7 +832,6 @@ LuaDefine(pprint, "obj1, obj2, ...", (*ostream) << std::endl; } return LS.result(); - } LuaDefine(pprintx, "options", diff --git a/luprex/lua/login.lua b/luprex/lua/login.lua index 2eabdde1..0618775f 100644 --- a/luprex/lua/login.lua +++ b/luprex/lua/login.lua @@ -42,3 +42,11 @@ function login.cb_p123_nopredict(actor, place, dialog) print(3) end +function gosomewhere() + local a = tangible.actor() + tangible.animate(a, {plane="somewhere"}) + end + +function mkt() + return tangible.build{class="login", animstate={plane="somewhere", xyz={1,2,3}}} + end \ No newline at end of file