summaryrefslogtreecommitdiff
path: root/src/serverenvironment.cpp
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2020-04-10 22:06:24 +0200
committerLoïc Blot <nerzhul@users.noreply.github.com>2020-04-11 13:12:51 +0200
commit054c5dfaa35dd79560a465ccc0ef214cb5f34c88 (patch)
tree7f9e2feefbee0708f3dc7371d3615767deba0048 /src/serverenvironment.cpp
parentf105bc8dc2444d98a9cd74a2caa0013ce2e07008 (diff)
downloadminetest-054c5dfaa35dd79560a465ccc0ef214cb5f34c88.tar.gz
minetest-054c5dfaa35dd79560a465ccc0ef214cb5f34c88.tar.bz2
minetest-054c5dfaa35dd79560a465ccc0ef214cb5f34c88.zip
scriptapi: Sort out ServerEnvironment / Environment distinction properly
The API implementation is shared between CSM and SSM. Functions should retrieve a plain env when they do not need any server-specific functions.
Diffstat (limited to 'src/serverenvironment.cpp')
-rw-r--r--src/serverenvironment.cpp18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/serverenvironment.cpp b/src/serverenvironment.cpp
index 2d3ee078e..0ccbd772b 100644
--- a/src/serverenvironment.cpp
+++ b/src/serverenvironment.cpp
@@ -545,24 +545,6 @@ bool ServerEnvironment::removePlayerFromDatabase(const std::string &name)
return m_player_database->removePlayer(name);
}
-bool ServerEnvironment::line_of_sight(v3f pos1, v3f pos2, v3s16 *p)
-{
- // Iterate trough nodes on the line
- voxalgo::VoxelLineIterator iterator(pos1 / BS, (pos2 - pos1) / BS);
- do {
- MapNode n = getMap().getNode(iterator.m_current_node_pos);
-
- // Return non-air
- if (n.param0 != CONTENT_AIR) {
- if (p)
- *p = iterator.m_current_node_pos;
- return false;
- }
- iterator.next();
- } while (iterator.m_current_index <= iterator.m_last_index);
- return true;
-}
-
void ServerEnvironment::kickAllPlayers(AccessDeniedCode reason,
const std::string &str_reason, bool reconnect)
{