summaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
authorSmallJoker <mk939@ymail.com>2018-06-20 22:36:08 +0200
committerSmallJoker <mk939@ymail.com>2018-06-26 15:38:42 +0200
commitdb42542e271a00efd017b192f3a63e04f5b3dbf4 (patch)
tree98e8a8381121415f86527252663628b1245f34ec /src/client.cpp
parent7bdf5eae05f63a98a13e520f98e68b9e7d9d544b (diff)
downloadminetest-db42542e271a00efd017b192f3a63e04f5b3dbf4.tar.gz
minetest-db42542e271a00efd017b192f3a63e04f5b3dbf4.tar.bz2
minetest-db42542e271a00efd017b192f3a63e04f5b3dbf4.zip
Rename CSM flavours to restrictions
& Satisfy LINT
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/client.cpp b/src/client.cpp
index 09c67c268..049d35379 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -130,13 +130,14 @@ void Client::loadMods()
return;
}
- // If modding is not enabled or flavour disable it, don't load mods, just builtin
+ // If modding is not enabled or CSM restrictions disable it
+ // don't load CSM mods, only builtin
if (!m_modding_enabled) {
warningstream << "Client side mods are disabled by configuration." << std::endl;
return;
}
- if (checkCSMFlavourLimit(CSMFlavourLimit::CSM_FL_LOAD_CLIENT_MODS)) {
+ if (checkCSMRestrictionFlag(CSMRestrictionFlags::CSM_RF_LOAD_CLIENT_MODS)) {
warningstream << "Client side mods are disabled by server." << std::endl;
// If mods loading is disabled and builtin integrity is wrong, disconnect user.
if (!checkBuiltinIntegrity()) {
@@ -1282,16 +1283,16 @@ void Client::removeNode(v3s16 p)
/**
* Helper function for Client Side Modding
- * Flavour is applied there, this should not be used for core engine
+ * CSM restrictions are applied there, this should not be used for core engine
* @param p
* @param is_valid_position
* @return
*/
MapNode Client::getNode(v3s16 p, bool *is_valid_position)
{
- if (checkCSMFlavourLimit(CSMFlavourLimit::CSM_FL_LOOKUP_NODES)) {
+ if (checkCSMRestrictionFlag(CSMRestrictionFlags::CSM_RF_LOOKUP_NODES)) {
v3s16 ppos = floatToInt(m_env.getLocalPlayer()->getPosition(), BS);
- if ((u32) ppos.getDistanceFrom(p) > m_csm_noderange_limit) {
+ if ((u32) ppos.getDistanceFrom(p) > m_csm_restriction_noderange) {
*is_valid_position = false;
return {};
}