diff options
author | sfan5 <sfan5@live.de> | 2020-05-14 21:16:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-14 21:16:45 +0200 |
commit | 36d35f2fe31a429c1510df680801940472416d45 (patch) | |
tree | f36be46515b7631ccbc581451c134e8d9c9a9265 /src/script/lua_api/l_env.cpp | |
parent | 6ef7ad09bbed9176d0d15f53b5cb14ef6e18a3b2 (diff) | |
download | hax-minetest-server-36d35f2fe31a429c1510df680801940472416d45.tar.gz hax-minetest-server-36d35f2fe31a429c1510df680801940472416d45.zip |
CSM: Bugfixes to camera:get_pos() and camera:get_fov()
closes #9857
Diffstat (limited to 'src/script/lua_api/l_env.cpp')
-rw-r--r-- | src/script/lua_api/l_env.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/script/lua_api/l_env.cpp b/src/script/lua_api/l_env.cpp index cabca124d..b8a8a5ce1 100644 --- a/src/script/lua_api/l_env.cpp +++ b/src/script/lua_api/l_env.cpp @@ -780,8 +780,8 @@ int ModApiEnvMod::l_find_node_near(lua_State *L) #ifndef SERVER // Client API limitations - if (getClient(L)) - radius = getClient(L)->CSMClampRadius(pos, radius); + if (Client *client = getClient(L)) + radius = client->CSMClampRadius(pos, radius); #endif for (int d = start_radius; d <= radius; d++) { @@ -811,9 +811,9 @@ int ModApiEnvMod::l_find_nodes_in_area(lua_State *L) const NodeDefManager *ndef = env->getGameDef()->ndef(); #ifndef SERVER - if (getClient(L)) { - minp = getClient(L)->CSMClampPos(minp); - maxp = getClient(L)->CSMClampPos(maxp); + if (Client *client = getClient(L)) { + minp = client->CSMClampPos(minp); + maxp = client->CSMClampPos(maxp); } #endif @@ -887,9 +887,9 @@ int ModApiEnvMod::l_find_nodes_in_area_under_air(lua_State *L) const NodeDefManager *ndef = env->getGameDef()->ndef(); #ifndef SERVER - if (getClient(L)) { - minp = getClient(L)->CSMClampPos(minp); - maxp = getClient(L)->CSMClampPos(maxp); + if (Client *client = getClient(L)) { + minp = client->CSMClampPos(minp); + maxp = client->CSMClampPos(maxp); } #endif |