mirror of
				https://github.com/TES3MP/openmw-tes3mp.git
				synced 2025-10-26 14:56:43 +00:00 
			
		
		
		
	Fix handling in fillVertexBuffers when the chunk is >1 ESM::Cell
This commit is contained in:
		
							parent
							
								
									819860081f
								
							
						
					
					
						commit
						b384087e28
					
				
					 2 changed files with 5 additions and 2 deletions
				
			
		|  | @ -335,4 +335,7 @@ namespace ESM | |||
|             } | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|     const int Land::LAND_SIZE; | ||||
| 
 | ||||
| } | ||||
|  |  | |||
|  | @ -232,8 +232,8 @@ namespace ESMTerrain | |||
|                 // Only relevant for chunks smaller than (contained in) one cell
 | ||||
|                 rowStart += (origin.x() - startCellX) * ESM::Land::LAND_SIZE; | ||||
|                 colStart += (origin.y() - startCellY) * ESM::Land::LAND_SIZE; | ||||
|                 int rowEnd = rowStart + std::min(1.f, size) * (ESM::Land::LAND_SIZE-1) + 1; | ||||
|                 int colEnd = colStart + std::min(1.f, size) * (ESM::Land::LAND_SIZE-1) + 1; | ||||
|                 int rowEnd = std::min(static_cast<int>(rowStart + std::min(1.f, size) * (ESM::Land::LAND_SIZE-1) + 1), ESM::Land::LAND_SIZE); | ||||
|                 int colEnd = std::min(static_cast<int>(colStart + std::min(1.f, size) * (ESM::Land::LAND_SIZE-1) + 1), ESM::Land::LAND_SIZE); | ||||
| 
 | ||||
|                 vertY = vertY_; | ||||
|                 for (int col=colStart; col<colEnd; col += increment) | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue