diff options
author | sfan5 <sfan5@live.de> | 2021-05-29 19:08:16 +0200 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2021-05-30 11:40:14 +0200 |
commit | f30dcdb504adb02724e3a5faa30a951eb907b33f (patch) | |
tree | 1df61cb29b7ca3042af2b4ab8523e169808a45df /src/client/content_cao.cpp | |
parent | 2c53f03c184b79d8f8774cb05edd288a7d337bef (diff) | |
download | minetest-f30dcdb504adb02724e3a5faa30a951eb907b33f.tar.gz minetest-f30dcdb504adb02724e3a5faa30a951eb907b33f.tar.bz2 minetest-f30dcdb504adb02724e3a5faa30a951eb907b33f.zip |
Fix procession ordering issue in content_cao
Diffstat (limited to 'src/client/content_cao.cpp')
-rw-r--r-- | src/client/content_cao.cpp | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/src/client/content_cao.cpp b/src/client/content_cao.cpp index 6c7559364..2e58e19cf 100644 --- a/src/client/content_cao.cpp +++ b/src/client/content_cao.cpp @@ -346,18 +346,6 @@ void GenericCAO::initialize(const std::string &data) infostream<<"GenericCAO: Got init data"<<std::endl; processInitData(data); - if (m_is_player) { - // Check if it's the current player - LocalPlayer *player = m_env->getLocalPlayer(); - if (player && strcmp(player->getName(), m_name.c_str()) == 0) { - m_is_local_player = true; - m_is_visible = false; - player->setCAO(this); - - m_prop.show_on_minimap = false; - } - } - m_enable_shaders = g_settings->getBool("enable_shaders"); } @@ -380,6 +368,16 @@ void GenericCAO::processInitData(const std::string &data) m_rotation = readV3F32(is); m_hp = readU16(is); + if (m_is_player) { + // Check if it's the current player + LocalPlayer *player = m_env->getLocalPlayer(); + if (player && strcmp(player->getName(), m_name.c_str()) == 0) { + m_is_local_player = true; + m_is_visible = false; + player->setCAO(this); + } + } + const u8 num_messages = readU8(is); for (int i = 0; i < num_messages; i++) { |