File tree 1 file changed +10
-12
lines changed
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)
346
346
infostream<<" GenericCAO: Got init data" <<std::endl;
347
347
processInitData (data);
348
348
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
-
361
349
m_enable_shaders = g_settings->getBool (" enable_shaders" );
362
350
}
363
351
@@ -380,6 +368,16 @@ void GenericCAO::processInitData(const std::string &data)
380
368
m_rotation = readV3F32 (is);
381
369
m_hp = readU16 (is);
382
370
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
+
383
381
const u8 num_messages = readU8 (is);
384
382
385
383
for (int i = 0 ; i < num_messages; i++) {
You can’t perform that action at this time.
0 commit comments