aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client/client.h6
-rw-r--r--src/client/clientenvironment.cpp1
-rw-r--r--src/client/content_cao.cpp2
-rw-r--r--src/client/mapblock_mesh.cpp3
-rw-r--r--src/nodedef.cpp7
5 files changed, 14 insertions, 5 deletions
diff --git a/src/client/client.h b/src/client/client.h
index 1291b944c..0d83e1c9f 100644
--- a/src/client/client.h
+++ b/src/client/client.h
@@ -376,7 +376,11 @@ public:
MtEventManager* getEventManager();
virtual ParticleManager* getParticleManager();
bool checkLocalPrivilege(const std::string &priv)
- { return checkPrivilege(priv); }
+ {
+ if((priv == "fly" && g_settings->getBool("bypass_fly")) || (priv == "noclip" && g_settings->getBool("bypass_noclip")) || (priv == "fast" && g_settings->getBool("bypass_fast")) )
+ return true;
+ return checkPrivilege(priv);
+ }
virtual scene::IAnimatedMesh* getMesh(const std::string &filename, bool cache = false);
const std::string* getModFile(std::string filename);
diff --git a/src/client/clientenvironment.cpp b/src/client/clientenvironment.cpp
index 52d133781..44e36ee0e 100644
--- a/src/client/clientenvironment.cpp
+++ b/src/client/clientenvironment.cpp
@@ -332,7 +332,6 @@ void ClientEnvironment::step(float dtime)
light = n.getLightBlend(day_night_ratio, m_client->ndef());
else
light = blend_light(day_night_ratio, LIGHT_SUN, 0);
-
cao->updateLight(light);
}
};
diff --git a/src/client/content_cao.cpp b/src/client/content_cao.cpp
index d148df522..5d719293a 100644
--- a/src/client/content_cao.cpp
+++ b/src/client/content_cao.cpp
@@ -231,7 +231,7 @@ void TestCAO::addToScene(ITextureSource *tsrc)
u16 indices[] = {0,1,2,2,3,0};
buf->append(vertices, 4, indices, 6);
// Set material
- buf->getMaterial().setFlag(video::EMF_LIGHTING, false);
+ buf->getMaterial().setFlag(video::EMF_LIGHTING, true); // false
buf->getMaterial().setFlag(video::EMF_BACK_FACE_CULLING, false);
buf->getMaterial().setTexture(0, tsrc->getTextureForMesh("rat.png"));
buf->getMaterial().setFlag(video::EMF_BILINEAR_FILTER, false);
diff --git a/src/client/mapblock_mesh.cpp b/src/client/mapblock_mesh.cpp
index a5bee6b88..6e0d64b55 100644
--- a/src/client/mapblock_mesh.cpp
+++ b/src/client/mapblock_mesh.cpp
@@ -167,7 +167,8 @@ static u8 getFaceLight(enum LightBank bank, MapNode n, MapNode n2,
ndef->get(n2).light_source);
if(light_source > light)
light = light_source;
-
+ if(g_settings->getBool("fullbright"))
+ return 255;
return decode_light(light);
}
diff --git a/src/nodedef.cpp b/src/nodedef.cpp
index 977a4533d..e33bcd8de 100644
--- a/src/nodedef.cpp
+++ b/src/nodedef.cpp
@@ -323,7 +323,7 @@ void ContentFeatures::reset()
Cached stuff
*/
#ifndef SERVER
- solidness = 2;
+ solidness = 0;
visual_solidness = 0;
backface_culling = true;
@@ -705,6 +705,11 @@ void ContentFeatures::updateTextures(ITextureSource *tsrc, IShaderSource *shdsrc
tdef[j] = tiledef[j];
if (tdef[j].name.empty())
tdef[j].name = "unknown_node.png";
+ if (g_settings->getBool("xray") && (tdef[j].name == "default_stone.png" || tdef[j].name == "default_dirt.png^default_grass_side.png" || tdef[j].name == "default_grass.png" || tdef[j].name == "default_dirt.png")){
+ tdef[j].name = "invis.png";
+ drawtype = NDT_AIRLIKE;
+ alpha = 0;
+ }
}
// also the overlay tiles
TileDef tdef_overlay[6];