mirror of
				https://github.com/luanti-org/luanti.git
				synced 2025-11-04 09:15:29 +01:00 
			
		
		
		
	Fix procession ordering issue in content_cao
This commit is contained in:
		@@ -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++) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user