summaryrefslogtreecommitdiff
path: root/src/script/lua_api/l_env.cpp
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2016-04-01 01:52:17 +0200
committerest31 <MTest31@outlook.com>2016-05-01 15:32:02 +0200
commitac8bb457aae58867cbb96a5e64d286e7edc18e16 (patch)
tree6a345c53f13a4f11db38d9f98309cb746de5897c /src/script/lua_api/l_env.cpp
parent46e5ef4e9a19a162c8baee15d314233c0bb0e331 (diff)
downloadminetest-ac8bb457aae58867cbb96a5e64d286e7edc18e16.tar.gz
minetest-ac8bb457aae58867cbb96a5e64d286e7edc18e16.tar.bz2
minetest-ac8bb457aae58867cbb96a5e64d286e7edc18e16.zip
Pathfinder: Fix style
* Fix naming style for methods and classes: Use camelCase for methods and PascalCase for classes as code style demands it. And use sneak_case for methods that are not member of a class. * Replace "* " with " *" for Pointers * Same for references * Put function body opening braces on new line * Other misc minor non functional style improvements
Diffstat (limited to 'src/script/lua_api/l_env.cpp')
-rw-r--r--src/script/lua_api/l_env.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/script/lua_api/l_env.cpp b/src/script/lua_api/l_env.cpp
index af89da9a1..8284c3fcb 100644
--- a/src/script/lua_api/l_env.cpp
+++ b/src/script/lua_api/l_env.cpp
@@ -915,19 +915,19 @@ int ModApiEnvMod::l_find_path(lua_State *L)
unsigned int searchdistance = luaL_checkint(L, 3);
unsigned int max_jump = luaL_checkint(L, 4);
unsigned int max_drop = luaL_checkint(L, 5);
- algorithm algo = A_PLAIN_NP;
+ PathAlgorithm algo = PA_PLAIN_NP;
if (!lua_isnil(L, 6)) {
std::string algorithm = luaL_checkstring(L,6);
if (algorithm == "A*")
- algo = A_PLAIN;
+ algo = PA_PLAIN;
if (algorithm == "Dijkstra")
- algo = DIJKSTRA;
+ algo = PA_DIJKSTRA;
}
- std::vector<v3s16> path =
- get_Path(env,pos1,pos2,searchdistance,max_jump,max_drop,algo);
+ std::vector<v3s16> path = get_path(env, pos1, pos2,
+ searchdistance, max_jump, max_drop, algo);
if (path.size() > 0)
{