From 392485aa454e871566a67afc61e11331f9d27397 Mon Sep 17 00:00:00 2001 From: Kahrl Date: Sat, 3 Dec 2011 08:40:32 +0100 Subject: inventorycube: use all three specified textures; also moved mesh creation / modification functions to mesh.cpp; in lua, inventorycube is now called minetest.inventorycube --- src/content_cao.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/content_cao.cpp') diff --git a/src/content_cao.cpp b/src/content_cao.cpp index b9dc91e63..da68004ce 100644 --- a/src/content_cao.cpp +++ b/src/content_cao.cpp @@ -27,6 +27,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "gamedef.h" #include "clientobject.h" #include "content_object.h" +#include "mesh.h" #include "utility.h" // For IntervalLimiter class Settings; #include "MyBillboardSceneNode.h" @@ -630,7 +631,7 @@ void ItemCAO::updateLight(u8 light_at_pos) u8 li = decode_light(light_at_pos); video::SColor color(255,li,li,li); - setMeshVerticesColor(m_node->getMesh(), color); + setMeshColor(m_node->getMesh(), color); } v3s16 ItemCAO::getLightPosition() @@ -778,7 +779,7 @@ void RatCAO::updateLight(u8 light_at_pos) u8 li = decode_light(light_at_pos); video::SColor color(255,li,li,li); - setMeshVerticesColor(m_node->getMesh(), color); + setMeshColor(m_node->getMesh(), color); } v3s16 RatCAO::getLightPosition() @@ -934,7 +935,7 @@ void Oerkki1CAO::updateLight(u8 light_at_pos) u8 li = decode_light(light_at_pos); video::SColor color(255,li,li,li); - setMeshVerticesColor(m_node->getMesh(), color); + setMeshColor(m_node->getMesh(), color); } v3s16 Oerkki1CAO::getLightPosition() @@ -1165,7 +1166,7 @@ void FireflyCAO::updateLight(u8 light_at_pos) u8 li = 255; video::SColor color(255,li,li,li); - setMeshVerticesColor(m_node->getMesh(), color); + setMeshColor(m_node->getMesh(), color); } v3s16 FireflyCAO::getLightPosition() @@ -1866,7 +1867,7 @@ public: u8 li = decode_light(light_at_pos); video::SColor color(255,li,li,li); if(m_meshnode){ - setMeshVerticesColor(m_meshnode->getMesh(), color); + setMeshColor(m_meshnode->getMesh(), color); m_meshnode->setVisible(true); } if(m_spritenode){ @@ -2250,7 +2251,7 @@ public: u8 li = decode_light(light_at_pos); video::SColor color(255,li,li,li); - setMeshVerticesColor(m_node->getMesh(), color); + setMeshColor(m_node->getMesh(), color); } v3s16 getLightPosition() -- cgit v1.2.3