mirror of
				https://github.com/luanti-org/luanti.git
				synced 2025-11-04 09:15:29 +01:00 
			
		
		
		
	Fix material properties and allow lighting. Models should now be affected by light instead of being black
This commit is contained in:
		
				
					committed by
					
						
						Perttu Ahola
					
				
			
			
				
	
			
			
			
						parent
						
							0a020dbcc8
						
					
				
				
					commit
					cb40b3517a
				
			@@ -1065,6 +1065,11 @@ public:
 | 
			
		||||
					m_prop.texture = "unknown_block.png";
 | 
			
		||||
				video::IVideoDriver* driver = m_animated_meshnode->getSceneManager()->getVideoDriver();
 | 
			
		||||
				m_animated_meshnode->setMaterialTexture(0, driver->getTexture(m_prop.texture.c_str()));
 | 
			
		||||
 | 
			
		||||
				// Set material flags and texture
 | 
			
		||||
				video::SMaterial& material = m_animated_meshnode->getMaterial(0);
 | 
			
		||||
				material.setFlag(video::EMF_LIGHTING, false);
 | 
			
		||||
				material.setFlag(video::EMF_BILINEAR_FILTER, false);
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		if(m_meshnode)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user