aboutsummaryrefslogtreecommitdiff
path: root/src/content_nodemeta.h
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2022-05-21 20:29:44 +0200
committersfan5 <sfan5@live.de>2022-06-03 21:48:52 +0200
commit575caa8015fe420ce5e709d6c137036dfc0262ef (patch)
treee3ea30432afdcf9adaeb6868da03afdc12ad4c9a /src/content_nodemeta.h
parent5f3af7d18b528e502e2cf09e0f46cc892df98dd4 (diff)
downloadminetest-575caa8015fe420ce5e709d6c137036dfc0262ef.tar.gz
minetest-575caa8015fe420ce5e709d6c137036dfc0262ef.tar.bz2
minetest-575caa8015fe420ce5e709d6c137036dfc0262ef.zip
Properly keep noclip state in Game and ClientMap
Diffstat (limited to 'src/content_nodemeta.h')
0 files changed, 0 insertions, 0 deletions
lass="hl com">the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "quicktune.h" #include <jmutex.h> #include <jmutexautolock.h> #include "util/string.h" std::string QuicktuneValue::getString() { switch(type){ case QVT_NONE: return "(none)"; case QVT_FLOAT: return ftos(value_QVT_FLOAT.current); } return "<invalid type>"; } void QuicktuneValue::relativeAdd(float amount) { switch(type){ case QVT_NONE: break; case QVT_FLOAT: value_QVT_FLOAT.current += amount * (value_QVT_FLOAT.max - value_QVT_FLOAT.min); if(value_QVT_FLOAT.current > value_QVT_FLOAT.max) value_QVT_FLOAT.current = value_QVT_FLOAT.max; if(value_QVT_FLOAT.current < value_QVT_FLOAT.min) value_QVT_FLOAT.current = value_QVT_FLOAT.min; break; } } static std::map<std::string, QuicktuneValue> g_values; static std::vector<std::string> g_names; JMutex *g_mutex = NULL; static void makeMutex() { if(!g_mutex){