summaryrefslogtreecommitdiff
path: root/src/content_mapnode.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-08-15 11:51:33 +0300
committerPerttu Ahola <celeron55@gmail.com>2011-08-15 11:51:33 +0300
commit8ab77f41531ab325a9dc027070e317d3651888dd (patch)
treea3e0e38486c7b02c7fea584cf03e60c711b7f4d1 /src/content_mapnode.cpp
parent472585a7e8e511e7cc210ad8e2c17cad9dfeb186 (diff)
downloadminetest-8ab77f41531ab325a9dc027070e317d3651888dd.tar.gz
minetest-8ab77f41531ab325a9dc027070e317d3651888dd.tar.bz2
minetest-8ab77f41531ab325a9dc027070e317d3651888dd.zip
Added #define WATER_ALPHA in content_mapnode.cpp
Diffstat (limited to 'src/content_mapnode.cpp')
-rw-r--r--src/content_mapnode.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/content_mapnode.cpp b/src/content_mapnode.cpp
index f3d5b9f59..a3c8d4b0a 100644
--- a/src/content_mapnode.cpp
+++ b/src/content_mapnode.cpp
@@ -24,6 +24,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "mapnode.h"
#include "content_nodemeta.h"
+#define WATER_ALPHA 160
+
// TODO: Get rid of these and set up some attributes like toughness,
// fluffyness, and a funciton to calculate time and durability loss
// (and sound? and whatever else) from them
@@ -372,7 +374,7 @@ void content_mapnode_init()
f->liquid_type = LIQUID_FLOWING;
f->liquid_alternative_flowing = CONTENT_WATER;
f->liquid_alternative_source = CONTENT_WATERSOURCE;
- f->vertex_alpha = 160;
+ f->vertex_alpha = WATER_ALPHA;
if(f->special_material == NULL && g_texturesource)
{
// Flowing water material
@@ -404,7 +406,7 @@ void content_mapnode_init()
if(g_texturesource)
t.texture = g_texturesource->getTexture("water.png");
- t.alpha = 160;
+ t.alpha = WATER_ALPHA;
t.material_type = MATERIAL_ALPHA_VERTEX;
t.material_flags &= ~MATERIAL_FLAG_BACKFACE_CULLING;
f->setAllTiles(t);
@@ -419,7 +421,7 @@ void content_mapnode_init()
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
f->liquid_alternative_flowing = CONTENT_WATER;
f->liquid_alternative_source = CONTENT_WATERSOURCE;
- f->vertex_alpha = 160;
+ f->vertex_alpha = WATER_ALPHA;
if(f->special_material == NULL && g_texturesource)
{
// Flowing water material