1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-22 17:18:39 +00:00

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.
This commit is contained in:
sfan5 2020-04-10 22:06:24 +02:00 committed by Loïc Blot
parent f105bc8dc2
commit 054c5dfaa3
7 changed files with 72 additions and 65 deletions

View file

@ -76,6 +76,16 @@ public:
u32 getDayCount();
/*!
* Returns false if the given line intersects with a
* non-air node, true otherwise.
* \param pos1 start of the line
* \param pos2 end of the line
* \param p output, position of the first non-air node
* the line intersects
*/
bool line_of_sight(v3f pos1, v3f pos2, v3s16 *p = nullptr);
/*!
* Gets the objects pointed by the shootline as
* pointed things.