diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-11-14 21:41:30 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-11-29 19:13:42 +0200 |
commit | c6fd2986d4261cf742d3bc21e8c12be59ab89f95 (patch) | |
tree | ef6ce8210f7f017bce42a024b75a44e73b5ab139 /src/camera.cpp | |
parent | abceeee92f99b84ebb79968269835a4f509bfb90 (diff) | |
download | minetest-c6fd2986d4261cf742d3bc21e8c12be59ab89f95.tar.gz minetest-c6fd2986d4261cf742d3bc21e8c12be59ab89f95.tar.bz2 minetest-c6fd2986d4261cf742d3bc21e8c12be59ab89f95.zip |
GameDef compiles
Diffstat (limited to 'src/camera.cpp')
-rw-r--r-- | src/camera.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/camera.cpp b/src/camera.cpp index d001f8916..74ecd6cec 100644 --- a/src/camera.cpp +++ b/src/camera.cpp @@ -27,7 +27,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include <cmath> #include <SAnimatedMesh.h> #include "settings.h" -#include "mapnode_contentfeatures.h" // For wield visualization +#include "nodedef.h" // For wield visualization Camera::Camera(scene::ISceneManager* smgr, MapDrawControl& draw_control): m_smgr(smgr), @@ -449,8 +449,11 @@ void Camera::updateSettings() m_wanted_frametime = 1.0 / wanted_fps; } -void Camera::wield(const InventoryItem* item, ITextureSource *tsrc) +void Camera::wield(const InventoryItem* item, IGameDef *gamedef) { + ITextureSource *tsrc = gamedef->tsrc(); + INodeDefManager *ndef = gamedef->ndef(); + if (item != NULL) { bool isCube = false; @@ -461,9 +464,9 @@ void Camera::wield(const InventoryItem* item, ITextureSource *tsrc) // A block-type material MaterialItem* mat_item = (MaterialItem*) item; content_t content = mat_item->getMaterial(); - if (content_features(content).solidness || content_features(content).visual_solidness) + if (ndef->get(content).solidness || ndef->get(content).visual_solidness) { - m_wieldnode->setCube(content_features(content).tiles); + m_wieldnode->setCube(ndef->get(content).tiles); m_wieldnode->setScale(v3f(30)); isCube = true; } |