made screen go slightly blue when underwater
parent
71f5d4b344
commit
7b290660ea
|
@ -293,6 +293,15 @@ public:
|
||||||
return m_access_denied_reason;
|
return m_access_denied_reason;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
This should only be used for calling the special drawing stuff in
|
||||||
|
ClientEnvironment
|
||||||
|
*/
|
||||||
|
ClientEnvironment * getEnv()
|
||||||
|
{
|
||||||
|
return &m_env;
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
// Virtual methods from con::PeerHandler
|
// Virtual methods from con::PeerHandler
|
||||||
|
|
|
@ -1865,6 +1865,22 @@ ClientEnvEvent ClientEnvironment::getClientEvent()
|
||||||
return m_client_event_queue.pop_front();
|
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
|
#endif // #ifndef SERVER
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -407,6 +407,9 @@ public:
|
||||||
// Get event from queue. CEE_NONE is returned if queue is empty.
|
// Get event from queue. CEE_NONE is returned if queue is empty.
|
||||||
ClientEnvEvent getClientEvent();
|
ClientEnvEvent getClientEvent();
|
||||||
|
|
||||||
|
// Post effects
|
||||||
|
void drawPostFx(video::IVideoDriver* driver, v3f camera_pos);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ClientMap *m_map;
|
ClientMap *m_map;
|
||||||
scene::ISceneManager *m_smgr;
|
scene::ISceneManager *m_smgr;
|
||||||
|
|
|
@ -2242,6 +2242,13 @@ void the_game(
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Environment post fx
|
||||||
|
*/
|
||||||
|
{
|
||||||
|
client.getEnv()->drawPostFx(driver, camera_position);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
End scene
|
End scene
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue