mirror of
https://github.com/luanti-org/luanti.git
synced 2025-09-15 18:57:08 +00:00
clean up params
This commit is contained in:
parent
c3391e4ff1
commit
7a0b12ddd1
3 changed files with 4 additions and 5 deletions
|
@ -626,7 +626,7 @@ MapBlockMesh::MapBlockMesh(Client *client, MeshMakeData *data):
|
|||
if (data->m_vmanip.getNodeNoEx(p).getContent() != CONTENT_IGNORE) {
|
||||
MinimapMapblock *block = new MinimapMapblock;
|
||||
m_minimap_mapblocks[mesh_grid.getOffsetIndex(ofs)] = block;
|
||||
block->getMinimapNodes(data, p);
|
||||
block->getMinimapNodes(&data->m_vmanip, data->m_nodedef, p);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -713,9 +713,8 @@ void Minimap::updateActiveMarkers()
|
|||
//// MinimapMapblock
|
||||
////
|
||||
|
||||
void MinimapMapblock::getMinimapNodes(MeshMakeData *meshdata, const v3s16 &pos)
|
||||
void MinimapMapblock::getMinimapNodes(VoxelManipulator *vmanip, const NodeDefManager *nodedef, const v3s16 &pos)
|
||||
{
|
||||
VoxelManipulator *vmanip = &meshdata->m_vmanip;
|
||||
for (s16 x = 0; x < MAP_BLOCKSIZE; x++)
|
||||
for (s16 z = 0; z < MAP_BLOCKSIZE; z++) {
|
||||
s16 air_count = 0;
|
||||
|
@ -725,7 +724,7 @@ void MinimapMapblock::getMinimapNodes(MeshMakeData *meshdata, const v3s16 &pos)
|
|||
for (s16 y = MAP_BLOCKSIZE -1; y >= 0; y--) {
|
||||
v3s16 p(x, y, z);
|
||||
MapNode n = vmanip->getNodeNoEx(pos + p);
|
||||
const ContentFeatures &f = meshdata->m_nodedef->get(n);
|
||||
const ContentFeatures &f = nodedef->get(n);
|
||||
if (!surface_found && f.drawtype != NDT_AIRLIKE) {
|
||||
mmpixel->height = y;
|
||||
mmpixel->n = n;
|
||||
|
|
|
@ -67,7 +67,7 @@ struct MinimapPixel {
|
|||
};
|
||||
|
||||
struct MinimapMapblock {
|
||||
void getMinimapNodes(MeshMakeData *data, const v3s16 &pos);
|
||||
void getMinimapNodes(VoxelManipulator *vmanip, const NodeDefManager *nodedef, const v3s16 &pos);
|
||||
|
||||
MinimapPixel data[MAP_BLOCKSIZE * MAP_BLOCKSIZE];
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue