mirror of
				https://github.com/Ukendio/jecs.git
				synced 2025-10-31 09:09:18 +00:00 
			
		
		
		
	Should set tags after builtin components
This commit is contained in:
		
							parent
							
								
									fd2c57fe17
								
							
						
					
					
						commit
						1225f205a8
					
				
					 1 changed files with 4 additions and 6 deletions
				
			
		
							
								
								
									
										10
									
								
								jecs.luau
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								jecs.luau
									
									
									
									
									
								
							|  | @ -2482,12 +2482,6 @@ local function world_new() | ||||||
| 		entity_index_new_id(entity_index) | 		entity_index_new_id(entity_index) | ||||||
| 	end | 	end | ||||||
| 
 | 
 | ||||||
| 	for i = EcsRest + 1, ecs_max_tag_id do |  | ||||||
| 		-- Initialize built-in components |  | ||||||
| 		entity_index_new_id(entity_index) |  | ||||||
| 		print("hm...", i) |  | ||||||
| 	end |  | ||||||
| 
 |  | ||||||
| 	world_add(self, EcsName, EcsComponent) | 	world_add(self, EcsName, EcsComponent) | ||||||
| 	world_add(self, EcsOnChange, EcsComponent) | 	world_add(self, EcsOnChange, EcsComponent) | ||||||
| 	world_add(self, EcsOnAdd, EcsComponent) | 	world_add(self, EcsOnAdd, EcsComponent) | ||||||
|  | @ -2510,6 +2504,10 @@ local function world_new() | ||||||
| 
 | 
 | ||||||
| 	world_add(self, EcsChildOf, ECS_PAIR(EcsOnDeleteTarget, EcsDelete)) | 	world_add(self, EcsChildOf, ECS_PAIR(EcsOnDeleteTarget, EcsDelete)) | ||||||
| 
 | 
 | ||||||
|  | 	for i = EcsRest + 1, ecs_max_tag_id do | ||||||
|  | 		entity_index_new_id(entity_index) | ||||||
|  | 	end | ||||||
|  | 
 | ||||||
| 	for i, bundle in ecs_metadata do | 	for i, bundle in ecs_metadata do | ||||||
| 		for ty, value in bundle do | 		for ty, value in bundle do | ||||||
| 			if value == NULL then | 			if value == NULL then | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue