diff --git a/src/unittest/test_voxelalgorithms.cpp b/src/unittest/test_voxelalgorithms.cpp index 6514d3713..767e9de31 100644 --- a/src/unittest/test_voxelalgorithms.cpp +++ b/src/unittest/test_voxelalgorithms.cpp @@ -133,6 +133,7 @@ void TestVoxelAlgorithms::testLighting(IGameDef *gamedef) map.addNodeAndUpdate(v3s16(-10, 0, 0), MapNode(CONTENT_AIR), modified_blocks); map.addNodeAndUpdate(v3s16(9, 10, -9), MapNode(t_CONTENT_WATER), modified_blocks); map.addNodeAndUpdate(v3s16(0, 0, 0), MapNode(t_CONTENT_TORCH), modified_blocks); + map.addNodeAndUpdate(v3s16(-10, 1, 0), MapNode(t_CONTENT_STONE, 153), modified_blocks); } const NodeDefManager *ndef = gamedef->ndef(); @@ -161,4 +162,9 @@ void TestVoxelAlgorithms::testLighting(IGameDef *gamedef) UASSERTEQ(int, n.getLight(LIGHTBANK_NIGHT, ndef->getLightingFlags(n)), 2); UASSERTEQ(int, n.getLight(LIGHTBANK_DAY, ndef->getLightingFlags(n)), 15); } + { + // Test that irrelevant param1 values are not clobbered. + MapNode n = map.getNode(v3s16(-10, 1, 0)); + UASSERTEQ(int, n.getParam1(), 153); + } }