File tree Expand file tree Collapse file tree 1 file changed +10
-12
lines changed
Expand file tree Collapse file tree 1 file changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -346,18 +346,6 @@ void GenericCAO::initialize(const std::string &data)
346346 infostream<<" GenericCAO: Got init data" <<std::endl;
347347 processInitData (data);
348348
349- if (m_is_player) {
350- // Check if it's the current player
351- LocalPlayer *player = m_env->getLocalPlayer ();
352- if (player && strcmp (player->getName (), m_name.c_str ()) == 0 ) {
353- m_is_local_player = true ;
354- m_is_visible = false ;
355- player->setCAO (this );
356-
357- m_prop.show_on_minimap = false ;
358- }
359- }
360-
361349 m_enable_shaders = g_settings->getBool (" enable_shaders" );
362350}
363351
@@ -380,6 +368,16 @@ void GenericCAO::processInitData(const std::string &data)
380368 m_rotation = readV3F32 (is);
381369 m_hp = readU16 (is);
382370
371+ if (m_is_player) {
372+ // Check if it's the current player
373+ LocalPlayer *player = m_env->getLocalPlayer ();
374+ if (player && strcmp (player->getName (), m_name.c_str ()) == 0 ) {
375+ m_is_local_player = true ;
376+ m_is_visible = false ;
377+ player->setCAO (this );
378+ }
379+ }
380+
383381 const u8 num_messages = readU8 (is);
384382
385383 for (int i = 0 ; i < num_messages; i++) {
You can’t perform that action at this time.
0 commit comments