mirror of
				https://github.com/godotengine/godot.git
				synced 2025-11-03 23:21:15 +00:00 
			
		
		
		
	Fix lighting_dirty flag bug
In rare circumstances, changing the geometry data attached to an instance, there was the opporunity for the lighting_dirty flag to get out of sync, which could lead to access to a stale light RID, and warnings or worse.
This PR fixes the problem by ensuring the lighting is always updated on the instance when first adding GeometryData.
(cherry picked from commit 26e93dc5c6)
			
			
This commit is contained in:
		
							parent
							
								
									e147fc3428
								
							
						
					
					
						commit
						c4d44e3826
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -324,7 +324,7 @@ public:
 | 
				
			||||||
		List<Instance *> lightmap_captures;
 | 
							List<Instance *> lightmap_captures;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		InstanceGeometryData() {
 | 
							InstanceGeometryData() {
 | 
				
			||||||
			lighting_dirty = false;
 | 
								lighting_dirty = true;
 | 
				
			||||||
			reflection_dirty = true;
 | 
								reflection_dirty = true;
 | 
				
			||||||
			can_cast_shadows = true;
 | 
								can_cast_shadows = true;
 | 
				
			||||||
			material_is_animated = true;
 | 
								material_is_animated = true;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue