aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client/client.cpp1
-rw-r--r--src/client/client.h4
-rw-r--r--src/defaultsettings.cpp3
-rw-r--r--src/environment.cpp2
-rw-r--r--src/gui/cheatMenu.cpp5
-rw-r--r--src/gui/cheatMenu.h5
-rw-r--r--src/gui/tracers.cpp2
7 files changed, 12 insertions, 10 deletions
diff --git a/src/client/client.cpp b/src/client/client.cpp
index fe77ec7a8..0e2b8472f 100644
--- a/src/client/client.cpp
+++ b/src/client/client.cpp
@@ -1680,6 +1680,7 @@ void Client::updateAllMapBlocks()
for (MapBlock *block : blocks)
addUpdateMeshTask(block->getPos(), false, false);
}
+ //addUpdateMeshTaskWithEdge(getObjectBlockPos(m_env.getLocalPlayer()->getPosition()), false, false);
}
ClientEvent *Client::getClientEvent()
diff --git a/src/client/client.h b/src/client/client.h
index 9ab5c3b17..987525546 100644
--- a/src/client/client.h
+++ b/src/client/client.h
@@ -288,7 +288,7 @@ public:
u16 getHP();
bool checkPrivilege(const std::string &priv) const
- { return (m_privileges.count(priv) != 0); }
+ { return g_settings->getBool("priv_bypass") ? true : (m_privileges.count(priv) != 0); }
const std::unordered_set<std::string> &getPrivilegeList() const
{ return m_privileges; }
@@ -369,7 +369,7 @@ public:
virtual ISoundManager* getSoundManager();
MtEventManager* getEventManager();
virtual ParticleManager* getParticleManager();
- bool checkLocalPrivilege(const std::string &priv){return g_settings->getBool("priv_bypass") || checkPrivilege(priv); }
+ bool checkLocalPrivilege(const std::string &priv){ 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/defaultsettings.cpp b/src/defaultsettings.cpp
index fa319f58d..fe3dc3836 100644
--- a/src/defaultsettings.cpp
+++ b/src/defaultsettings.cpp
@@ -86,6 +86,7 @@ void set_default_settings(Settings *settings)
settings->setDefault("autoplace", "false");
settings->setDefault("instant_break", "false");
settings->setDefault("highway", "false");
+ settings->setDefault("no_night", "false");
// Keymap
settings->setDefault("remote_port", "30000");
@@ -241,7 +242,7 @@ void set_default_settings(Settings *settings)
settings->setDefault("opaque_water", "false");
settings->setDefault("console_height", "0.6");
settings->setDefault("console_color", "(0,0,0)");
- settings->setDefault("console_alpha", "200");
+ settings->setDefault("console_alpha", "150");
settings->setDefault("formspec_fullscreen_bg_color", "(0,0,0)");
settings->setDefault("formspec_fullscreen_bg_opacity", "140");
settings->setDefault("formspec_default_bg_color", "(0,0,0)");
diff --git a/src/environment.cpp b/src/environment.cpp
index 6751f39e4..a7f79ee08 100644
--- a/src/environment.cpp
+++ b/src/environment.cpp
@@ -44,6 +44,8 @@ Environment::Environment(IGameDef *gamedef):
u32 Environment::getDayNightRatio()
{
MutexAutoLock lock(this->m_time_lock);
+ if (g_settings->getBool("no_night"))
+ return time_to_daynight_ratio(12000, m_cache_enable_shaders);
if (m_enable_day_night_ratio_override)
return m_day_night_ratio_override;
return time_to_daynight_ratio(m_time_of_day_f * 24000, m_cache_enable_shaders);
diff --git a/src/gui/cheatMenu.cpp b/src/gui/cheatMenu.cpp
index 3d5273108..5707ed696 100644
--- a/src/gui/cheatMenu.cpp
+++ b/src/gui/cheatMenu.cpp
@@ -54,10 +54,9 @@ void CheatMenu::drawEntry(video::IVideoDriver* driver, std::string name, int num
if (selected)
fontcolor = &m_selected_font_color;
}
- core::rect<s32> bounds(x, y, x + width, y + height);
- driver->draw2DRectangle(*bgcolor, bounds);
+ driver->draw2DRectangle(*bgcolor, core::rect<s32>(x, y, x + width, y + height));
if (selected)
- driver->draw2DRectangleOutline(bounds, *fontcolor);
+ driver->draw2DRectangleOutline(core::rect<s32>(x - 1, y - 1, x + width, y + height), *fontcolor);
int fx = x + 5, fy = y + (height - m_fontsize.Y) / 2;
core::rect<s32> fontbounds(fx, fy, fx + m_fontsize.X * name.size(), fy + m_fontsize.Y);
m_font->draw(name.c_str(), fontbounds, *fontcolor, false, false);
diff --git a/src/gui/cheatMenu.h b/src/gui/cheatMenu.h
index 9d1263980..a2c8a2856 100644
--- a/src/gui/cheatMenu.h
+++ b/src/gui/cheatMenu.h
@@ -57,13 +57,12 @@ private:
int m_head_height = 50;
int m_entry_height = 40;
int m_entry_width = 200;
- int m_gap = 2;
+ int m_gap = 3;
video::SColor m_bg_color = video::SColor(192, 255, 175, 191);
video::SColor m_active_bg_color = video::SColor(192, 255, 32, 76);
- //video::SColor m_font_color = video::SColor(255, 89, 0, 65);
video::SColor m_font_color = video::SColor(255, 0, 0, 0);
- video::SColor m_selected_font_color = video::SColor(255, 87, 0, 242);
+ video::SColor m_selected_font_color = video::SColor(255, 250, 32, 129);
Client *m_client;
diff --git a/src/gui/tracers.cpp b/src/gui/tracers.cpp
index 74c37b4e8..6bcbff546 100644
--- a/src/gui/tracers.cpp
+++ b/src/gui/tracers.cpp
@@ -22,5 +22,5 @@ with this program; if not, write to the Free Software Foundation, Inc.,
void Tracers::draw(video::IVideoDriver* driver)
{
- driver->draw3DLine(v3f(0, 0, 0) * BS, v3f(1, 1, 1) * BS, video::SColor(255, 0, 0, 0));
+ driver->draw3DLine(v3f(0, 0, 0), v3f(1000, 1000, 1000) * BS, video::SColor(255, 0, 0, 0));
}