aboutsummaryrefslogtreecommitdiff
path: root/src/translation.h
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2022-05-08 14:01:32 +0100
committerrubenwardy <rw@rubenwardy.com>2022-05-08 14:01:32 +0100
commit9824a451bb8d6f632aa80abc186f440f8d5a745a (patch)
tree7f08050f7698b8742654df8d97dcc6e0e22a3843 /src/translation.h
parente0e897832c5acf29eef03cc4303c85a0a17f9983 (diff)
downloadminetest-9824a451bb8d6f632aa80abc186f440f8d5a745a.tar.gz
minetest-9824a451bb8d6f632aa80abc186f440f8d5a745a.tar.bz2
minetest-9824a451bb8d6f632aa80abc186f440f8d5a745a.zip
Fix mods not being recursively enabled
Fixes #12290
Diffstat (limited to 'src/translation.h')
0 files changed, 0 insertions, 0 deletions
' href='#n115'>115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179
/*
Minetest
Copyright (C) 2017 nerzhul, Loic Blot <loic.blot@unix-experience.fr>

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
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 <cassert>
#include <json/json.h>
#include "database-files.h"
#include "content_sao.h"
#include "remoteplayer.h"
#include "settings.h"
#include "porting.h"
#include "filesys.h"

// !!! WARNING !!!
// This backend is intended to be used on Minetest 0.4.16 only for the transition backend
// for player files

void PlayerDatabaseFiles::serialize(std::ostringstream &os, RemotePlayer *player)
{
	// Utilize a Settings object for storing values
	Settings args;
	args.setS32("version", 1);
	args.set("name", player->getName());

	sanity_check(player->getPlayerSAO());
	args.setS32("hp", player->getPlayerSAO()->getHP());
	args.setV3F("position", player->getPlayerSAO()->getBasePosition());
	args.setFloat("pitch", player->getPlayerSAO()->getPitch());
	args.setFloat("yaw", player->getPlayerSAO()->getYaw());