Compare commits

..

5 Commits

Author SHA1 Message Date
azw
38d534d6cf 1 2023-11-06 05:47:21 +00:00
aozhiwei
f797e73be9 Merge branch 'master' of git.kingsome.cn:server_common/masterserver 2022-05-26 20:27:28 +08:00
aozhiwei
14a5149668 1 2022-05-26 20:27:19 +08:00
aozhiwei
75df23693b 1 2022-03-07 14:42:18 +08:00
aozhiwei
9cf49c2e49 1 2022-03-07 14:00:08 +08:00
7 changed files with 27 additions and 14 deletions

View File

@ -15,6 +15,14 @@ else()
set(CMAKE_BUILD_TYPE "Debug")
message("debug mode")
endif()
if (${LIB_DIR})
message(LIB_DIR: ${LIB_DIR})
else()
set(LIB_DIR )
message(LIB_DIR: ${LIB_DIR} )
endif()
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -Wall -g -std=gnu++11 -DGAME_ID=${GAME_ID} -DNDEBUG")
set(CMAKE_CXX_FLAGS_DEBUG "-Wall -g -std=gnu++11 -DGAME_ID=${GAME_ID} -DDEBUG")
@ -28,6 +36,7 @@ include_directories(
/usr/include/glm
../../third_party
../../third_party/behaviac/inc
../../third_party/recastnavigation/Recast/Include
../../third_party/recastnavigation/Detour/Include
../../third_party/recastnavigation/DetourTileCache/Include
.
@ -36,7 +45,7 @@ include_directories(
link_directories(
/usr/lib64/mysql
/usr/local/lib
../../third_party/behaviac/lib
../../third_party/behaviac/lib/${LIB_DIR}
)
aux_source_directory(../../third_party/a8engine/a8
@ -47,6 +56,10 @@ aux_source_directory(../../third_party/framework/cpp
SRC_LIST
)
aux_source_directory(../../third_party/recastnavigation/Recast/Source
SRC_LIST
)
aux_source_directory(../../third_party/recastnavigation/Detour/Source
SRC_LIST
)
@ -97,7 +110,7 @@ if (CMAKE_BUILD_TYPE STREQUAL "Debug")
hiredis
tinyxml2
tcmalloc
behaviac_gcc_debug
behaviac_gcc_release
)
else()
target_link_libraries(

View File

@ -203,9 +203,13 @@ GSNode* GSMgr::AllocNode(int channel)
GSNode* n2 = sorted_nodes->at(sorted_nodes->size() - 2);
if (n1->online_num < 100 && n2->online_num < 100) {
if (n1->instance_id < n2->instance_id) {
return n1;
if (n1->servicing) {
return n1;
}
} else {
return n2;
if (n2->servicing) {
return n2;
}
}
}
}

View File

@ -10,17 +10,13 @@ void JsonDataMgr::Init()
std::string masterserver_cluster_json_file;
if (!f8::IsOnlineEnv()) {
if (f8::IsTestEnv()) {
work_path_ = a8::Format("/root/pub/%d/%d/conf_test/game%d/masterserver.test",
work_path_ = a8::Format("../../../conf_test/game%d/masterserver.test",
{
GAME_ID,
App::Instance()->instance_id,
GAME_ID
});
} else {
work_path_ = a8::Format("/root/pub/%d/%d/conf_test/game%d/masterserver.dev",
work_path_ = a8::Format("../../../conf_test/game%d/masterserver.dev",
{
GAME_ID,
App::Instance()->instance_id,
GAME_ID
});
}

@ -1 +1 @@
Subproject commit 4c181a0473b0e9f43e0df6b4ee6f158ff9de3e1f
Subproject commit 9c890ba78e289d4879f921b94b558e10d66b2b64

@ -1 +1 @@
Subproject commit 240414570ee2848291d24ff8d3102dc43d4104a3
Subproject commit 5beca57f6555aa0d9e4de71c93653cade928a654

@ -1 +1 @@
Subproject commit eb455bb95f97dc506566c443be0c72960ceebabf
Subproject commit 180f9e3f5cdad81a58fe4f8a96b0bd6388eef222

2
third_party/tools vendored

@ -1 +1 @@
Subproject commit 43a09bd136f0d28c61cd03103b9d151af1317381
Subproject commit 725d70ebaba30c20124075cf5e4bd751d2404d28