mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
General code refactoring/improvements in server, treegen and connection
This commit is contained in:
parent
24f2c38093
commit
bc4ab8b99e
34 changed files with 330 additions and 439 deletions
|
@ -1346,7 +1346,7 @@ int ModApiEnv::l_spawn_tree(lua_State *L)
|
|||
|
||||
ServerMap *map = &env->getServerMap();
|
||||
treegen::error e;
|
||||
if ((e = treegen::spawn_ltree (map, p0, ndef, tree_def)) != treegen::SUCCESS) {
|
||||
if ((e = treegen::spawn_ltree (map, p0, tree_def)) != treegen::SUCCESS) {
|
||||
if (e == treegen::UNBALANCED_BRACKETS) {
|
||||
luaL_error(L, "spawn_tree(): closing ']' has no matching opening bracket");
|
||||
} else {
|
||||
|
@ -1652,7 +1652,7 @@ int ModApiEnvVM::l_spawn_tree(lua_State *L)
|
|||
return 0;
|
||||
|
||||
treegen::error e;
|
||||
if ((e = treegen::make_ltree(*vm, p0, ndef, tree_def)) != treegen::SUCCESS) {
|
||||
if ((e = treegen::make_ltree(*vm, p0, tree_def)) != treegen::SUCCESS) {
|
||||
if (e == treegen::UNBALANCED_BRACKETS) {
|
||||
throw LuaError("spawn_tree(): closing ']' has no matching opening bracket");
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue