diff --git a/CMakeLists.txt b/CMakeLists.txt index 3a6f3ee..2ed04c1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -64,7 +64,7 @@ target_include_directories(${MOD_API_NAME} target_link_libraries(${MOD_API_NAME} ${PROJECT_SOURCE_DIR}/api/lib/detours.lib) ####################这里是具体功能########################## -set(TRAPDOOR_VERSION 0.10.0) +set(TRAPDOOR_VERSION 0.10.2) set(MCBE_VERSION 1.18.2.03) set(BETA OFF) set(TEST_NUMBER 1) diff --git a/api/language/lang/en_us b/api/language/lang/en_us index 57f19c7..3cea874 100644 --- a/api/language/lang/en_us +++ b/api/language/lang/en_us @@ -13,7 +13,9 @@ R"=====( "command.tick.fw.desc": "Step the world [num] gt", "command.tick.q.desc": "Query tick status", "command.prof.desc": "Game performance analysis", - "command.prof.actor.desc": "Entities ticking prformance analysis", + "command.prof.actor.desc": "Entities ticking performance analysis", + "command.prof.chunk.desc": "Chunks ticking performance analysis", + "command.prof.pt.desc": "Pending tick performance analysis", "command.mspt.desc": "Display Mspt and tps", "tick.fz.set": "The world ticking has stopped", "tick.r.set": "The world has been back to normal state", diff --git a/api/language/lang/zh_cn b/api/language/lang/zh_cn index e2c5e65..b4dbe81 100644 --- a/api/language/lang/zh_cn +++ b/api/language/lang/zh_cn @@ -14,6 +14,8 @@ R"=====( "command.tick.q.desc": "查询tick状态", "command.prof.desc": "游戏性能分析", "command.prof.actor.desc": "实体性能分析", + "command.prof.chunk.desc": "区块更新性能分析", + "command.prof.pt.desc": "计划刻(PendingTick)性能分析", "command.mspt.desc": "显示Mspt和tps", "tick.fz.set": "世界运行已经停止", "tick.r.set": "世界已恢复初始状态", diff --git a/changelog.md b/changelog.md index 897158a..2261d20 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,11 @@ +# 1.18.2.03-0.10.2 +- 新加`prof chunk`显示每个区块的卡顿情况(固定测量20gt) +- 新加 `prof pt`显示每个区块的计划刻(Pending tick)队列溢出情况(固定测量20gt) +- 修复`self`的东西方向错误(#72) +- 修复`os`的可能闪退(#71) + + + # 1.18.2.03-0.9.96 2022-02-05 - 如果配置文件不存在可以选择自动生成 diff --git a/mod/tick/SimpleProfiler.cpp b/mod/tick/SimpleProfiler.cpp index 5e78a30..4233b0d 100644 --- a/mod/tick/SimpleProfiler.cpp +++ b/mod/tick/SimpleProfiler.cpp @@ -111,7 +111,7 @@ namespace mod { } trapdoor::MessageBuilder builder; builder.textF( - "%zu chunks ticked,here are the cached pending tick size\n", + "%zu chunks ticked,here are the cached pending tick queue length\n", this->chunkStat.counter.size()); for (int i = 0; i < count; i++) { auto &d = data[i]; diff --git a/tools/package/npack.py b/tools/package/npack.py new file mode 100644 index 0000000..0cfb50e --- /dev/null +++ b/tools/package/npack.py @@ -0,0 +1,59 @@ +import os +import zipfile + +project_root_dir = 'C:/Users/xhy/dev/TrapDoor/' +build_dir = 'build/' +other_files = ['changelog.md', + 'trapdoor-disclaimer.md', + 'LICENSE' + ] + + +def get_versions(): + dll_dir = project_root_dir + build_dir + dll_files = [] + for f in os.listdir(dll_dir): + if f.endswith('.dll'): + dll_files.append(f) + if len(dll_files) == 0: + input('warning: no valid files') + exit(0) + + dll_files.sort() + tips = 'choose one to pack\n' + index = 0 + for file in reversed(dll_files): + tips += '[' + str(index) + '] : ' + file+'\n' + index += 1 + # print(tips) + + idx = 0 + if len(dll_files) > 1: + idx = input(tips) + idx = int(idx) + if idx < 0 or idx >= len(dll_files): + input('invalid files\n') + exit(0) + + return dll_files[len(dll_files)-1-idx] + + +def pack(dll_file): + version = dll_file[:-4] + print('version is '+version) + print('begin packing...') + release_zip_file = zipfile.ZipFile(version + '.zip', 'w') + release_zip_file.write(project_root_dir + build_dir + + version + '.dll', arcname=version+'.dll') + release_zip_file.write(project_root_dir + build_dir + + version + '.pdb', arcname=version+'.pdb') + for other_file in other_files: + print('pack: ' + other_file) + release_zip_file.write(project_root_dir+other_file, + arcname='others/'+other_file) + release_zip_file.close() + input('success pack release:' + version+'.zip\n') + + +if __name__ == '__main__': + pack(get_versions())