diff options
author | sfan5 <sfan5@live.de> | 2019-11-08 22:57:03 +0100 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2019-11-11 14:06:48 +0100 |
commit | b0260b5ec8e05e54928f9487bb39b4ff946951f9 (patch) | |
tree | d5e8c2e1c43507549da008dbac2eeba1d6ab059b /src/client/client.h | |
parent | 4d668f32a6d9a0d895a2385dec994d43bd084410 (diff) | |
download | hax-minetest-server-b0260b5ec8e05e54928f9487bb39b4ff946951f9.tar.gz hax-minetest-server-b0260b5ec8e05e54928f9487bb39b4ff946951f9.zip |
Refactor CSM restriction code a bit
This also fixes find_node_near restrictions being ineffective.
Diffstat (limited to 'src/client/client.h')
-rw-r--r-- | src/client/client.h | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/client/client.h b/src/client/client.h index 53b47edd0..5f3362509 100644 --- a/src/client/client.h +++ b/src/client/client.h @@ -261,14 +261,10 @@ public: // Causes urgent mesh updates (unlike Map::add/removeNodeWithEvent) void removeNode(v3s16 p); - /** - * Helper function for Client Side Modding - * CSM restrictions are applied there, this should not be used for core engine - * @param p - * @param is_valid_position - * @return - */ - MapNode getNode(v3s16 p, bool *is_valid_position); + // helpers to enforce CSM restrictions + MapNode CSMGetNode(v3s16 p, bool *is_valid_position); + int CSMClampRadius(v3s16 pos, int radius); + void addNode(v3s16 p, MapNode n, bool remove_metadata = true); void setPlayerControl(PlayerControl &control); |