Tools/MeshExtractor: Fixed a crash when parsing liquid data (Thanks @Cyberium).
Added some support for other liquid types in the liquid chunks (Namely Magma and Slime)
This commit is contained in:
1 parent
dffa010f8a
commit
31bd3bab3f
6 files changed
+48
-13
No files matched your search
@@ -47,12 +47,12 @@ void MapChunk::GenerateTriangles()
|
||||
Constants::TriangleType triangleType = Constants::TRIANGLE_TYPE_TERRAIN;
|
||||
if (Adt->_LiquidHandler && !Adt->_LiquidHandler->MCNKData.empty())
|
||||
{
|
||||
MCNKLiquidData& data = Adt->_LiquidHandler->MCNKData[Index];
|
||||
MCNKLiquidData* data = Adt->_LiquidHandler->MCNKData[Index];
|
||||
float maxHeight = std::max(
|
||||
std::max(
|
||||
std::max(std::max(Vertices[topLeft].z, Vertices[topRight].z), Vertices[bottomLeft].z),
|
||||
Vertices[bottomRight].z), Vertices[center].z);
|
||||
if (data.IsWater(x, y, maxHeight))
|
||||
if (data->IsWater(x, y, maxHeight))
|
||||
triangleType = Constants::TRIANGLE_TYPE_WATER;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user