aboutsummaryrefslogtreecommitdiff
path: root/src/environment.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-07-01 21:25:31 +0300
committerPerttu Ahola <celeron55@gmail.com>2011-07-01 21:25:31 +0300
commit7b290660ead5e9cfc7ee2762217212ff995a6c85 (patch)
tree02418d6b8b00aafa719e89d4c6cfc5234b71c6b1 /src/environment.cpp
parent71f5d4b3443c6ea770463838a2c84b85d9fa3b21 (diff)
downloadminetest-7b290660ead5e9cfc7ee2762217212ff995a6c85.tar.gz
minetest-7b290660ead5e9cfc7ee2762217212ff995a6c85.tar.bz2
minetest-7b290660ead5e9cfc7ee2762217212ff995a6c85.zip
made screen go slightly blue when underwater
Diffstat (limited to 'src/environment.cpp')
-rw-r--r--src/environment.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/environment.cpp b/src/environment.cpp
index ac78107a3..d55aa38d1 100644
--- a/src/environment.cpp
+++ b/src/environment.cpp
@@ -1865,6 +1865,22 @@ ClientEnvEvent ClientEnvironment::getClientEvent()
return m_client_event_queue.pop_front();
}
+void ClientEnvironment::drawPostFx(video::IVideoDriver* driver, v3f camera_pos)
+{
+ /*LocalPlayer *player = getLocalPlayer();
+ assert(player);
+ v3f pos_f = player->getPosition() + v3f(0,BS*1.625,0);*/
+ v3f pos_f = camera_pos;
+ v3s16 p_nodes = floatToInt(pos_f, BS);
+ MapNode n = m_map->getNodeNoEx(p_nodes);
+ if(n.d == CONTENT_WATER || n.d == CONTENT_WATERSOURCE)
+ {
+ v2u32 ss = driver->getScreenSize();
+ core::rect<s32> rect(0,0, ss.X, ss.Y);
+ driver->draw2DRectangle(video::SColor(64, 100, 100, 200), rect);
+ }
+}
+
#endif // #ifndef SERVER