aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-11-16 14:48:05 +0200
committerPerttu Ahola <celeron55@gmail.com>2011-11-29 19:13:47 +0200
commita5545593baaf879f7c57f4b4ec1712ccbd87375a (patch)
treef17234d378184b04295974a7992760ea1a056684 /src
parentf68fa667c8723cc39f113502c53cc5c35eb32ab6 (diff)
downloadminetest-a5545593baaf879f7c57f4b4ec1712ccbd87375a.tar.gz
minetest-a5545593baaf879f7c57f4b4ec1712ccbd87375a.tar.bz2
minetest-a5545593baaf879f7c57f4b4ec1712ccbd87375a.zip
Fix camera MaterialItem draw logic
Diffstat (limited to 'src')
-rw-r--r--src/camera.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/camera.cpp b/src/camera.cpp
index 938c7a5ce..54b3326fa 100644
--- a/src/camera.cpp
+++ b/src/camera.cpp
@@ -464,11 +464,19 @@ void Camera::wield(const InventoryItem* item, IGameDef *gamedef)
// A block-type material
MaterialItem* mat_item = (MaterialItem*) item;
content_t content = mat_item->getMaterial();
- if (ndef->get(content).solidness || ndef->get(content).visual_solidness)
- {
+ switch(ndef->get(content).drawtype){
+ case NDT_NORMAL:
+ case NDT_LIQUID:
+ case NDT_FLOWINGLIQUID:
+ case NDT_GLASSLIKE:
+ case NDT_ALLFACES:
+ case NDT_ALLFACES_OPTIONAL:
m_wieldnode->setCube(ndef->get(content).tiles);
m_wieldnode->setScale(v3f(30));
isCube = true;
+ break;
+ default:
+ break;
}
}