From: Perttu Ahola Date: Wed, 16 Nov 2011 12:48:05 +0000 (+0200) Subject: Fix camera MaterialItem draw logic X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=a5545593baaf879f7c57f4b4ec1712ccbd87375a;p=zefram%2Fminetest%2Fminetest_engine.git Fix camera MaterialItem draw logic --- diff --git a/src/camera.cpp b/src/camera.cpp index 938c7a5c..54b3326f 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; } }