File tree 1 file changed +10
-4
lines changed
1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -1288,14 +1288,21 @@ void MapblockMeshGenerator::errorUnknownDrawtype()
1288
1288
1289
1289
void MapblockMeshGenerator::drawNode ()
1290
1290
{
1291
+ // skip some drawtypes early
1292
+ switch (f->drawtype ) {
1293
+ case NDT_NORMAL: // Drawn by MapBlockMesh
1294
+ case NDT_AIRLIKE: // Not drawn at all
1295
+ case NDT_LIQUID: // Drawn by MapBlockMesh
1296
+ return ;
1297
+ default :
1298
+ break ;
1299
+ }
1300
+ origin = intToFloat (p, BS);
1291
1301
if (data->m_smooth_lighting )
1292
1302
getSmoothLightFrame ();
1293
1303
else
1294
1304
light = getInteriorLight (n, 1 , nodedef);
1295
1305
switch (f->drawtype ) {
1296
- case NDT_NORMAL: break ; // Drawn by MapBlockMesh
1297
- case NDT_AIRLIKE: break ; // Not drawn at all
1298
- case NDT_LIQUID: break ; // Drawn by MapBlockMesh
1299
1306
case NDT_FLOWINGLIQUID: drawLiquidNode (); break ;
1300
1307
case NDT_GLASSLIKE: drawGlasslikeNode (); break ;
1301
1308
case NDT_GLASSLIKE_FRAMED: drawGlasslikeFramedNode (); break ;
@@ -1324,7 +1331,6 @@ void MapblockMeshGenerator::generate()
1324
1331
for (p.X = 0 ; p.X < MAP_BLOCKSIZE; p.X ++) {
1325
1332
n = data->m_vmanip .getNodeNoEx (blockpos_nodes + p);
1326
1333
f = &nodedef->get (n);
1327
- origin = intToFloat (p, BS);
1328
1334
drawNode ();
1329
1335
}
1330
1336
}
You can’t perform that action at this time.
0 commit comments