aboutsummaryrefslogtreecommitdiff
path: root/src/test.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-04-03 19:50:54 +0300
committerPerttu Ahola <celeron55@gmail.com>2011-04-03 19:50:54 +0300
commite0f7bd4d57bf0c9b497c4d0bb73f7bd4d5cc0643 (patch)
tree756f4451eac9a1446a4b1acd8f5cda3f625eabb3 /src/test.cpp
parent01c2b003e1efb839ad246eb939af7fa8336b9ad5 (diff)
downloadminetest-e0f7bd4d57bf0c9b497c4d0bb73f7bd4d5cc0643.tar.gz
minetest-e0f7bd4d57bf0c9b497c4d0bb73f7bd4d5cc0643.tar.bz2
minetest-e0f7bd4d57bf0c9b497c4d0bb73f7bd4d5cc0643.zip
Modified block mesh generation to have clearer input and output. Instead of being a messy object oriented cludge, it now is a messy cludge with separate parameters.
Diffstat (limited to 'src/test.cpp')
-rw-r--r--src/test.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test.cpp b/src/test.cpp
index 1de902787..c7bffcdf3 100644
--- a/src/test.cpp
+++ b/src/test.cpp
@@ -517,14 +517,14 @@ struct TestMapBlock
assert(b.getNode(v3s16(1,1,0)).getLight(LIGHTBANK_DAY) == 0);
assert(b.getNode(v3s16(1,0,0)).getLight(LIGHTBANK_DAY) == 0);
assert(b.getNode(v3s16(1,2,3)).getLight(LIGHTBANK_DAY) == LIGHT_SUN);
- assert(b.getFaceLight(1000, p, v3s16(0,1,0)) == LIGHT_SUN);
- assert(b.getFaceLight(1000, p, v3s16(0,-1,0)) == 0);
- assert(b.getFaceLight(0, p, v3s16(0,-1,0)) == 0);
+ assert(b.getFaceLight2(1000, p, v3s16(0,1,0)) == LIGHT_SUN);
+ assert(b.getFaceLight2(1000, p, v3s16(0,-1,0)) == 0);
+ assert(b.getFaceLight2(0, p, v3s16(0,-1,0)) == 0);
// According to MapBlock::getFaceLight,
// The face on the z+ side should have double-diminished light
//assert(b.getFaceLight(p, v3s16(0,0,1)) == diminish_light(diminish_light(LIGHT_MAX)));
// The face on the z+ side should have diminished light
- assert(b.getFaceLight(1000, p, v3s16(0,0,1)) == diminish_light(LIGHT_MAX));
+ assert(b.getFaceLight2(1000, p, v3s16(0,0,1)) == diminish_light(LIGHT_MAX));
}
/*
Check how the block handles being in between blocks with some non-sunlight