aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkwolekr <kwolekr@minetest.net>2013-09-16 23:52:42 -0400
committerkwolekr <kwolekr@minetest.net>2013-09-16 23:52:42 -0400
commitc0398224ef60b73067351d3e8f7a6e0d1ff7df72 (patch)
tree3f1432db70b8b3ef001f289b07deaca8430e050b
parent9bccd75e340d7502251c233418e0afccd9c4a49c (diff)
downloadminetest-c0398224ef60b73067351d3e8f7a6e0d1ff7df72.tar.gz
minetest-c0398224ef60b73067351d3e8f7a6e0d1ff7df72.tar.bz2
minetest-c0398224ef60b73067351d3e8f7a6e0d1ff7df72.zip
Fix some warnings and other minor details
-rw-r--r--src/main.cpp6
-rw-r--r--src/map.cpp2
-rw-r--r--src/script/lua_api/l_mapgen.cpp2
-rw-r--r--src/server.cpp2
4 files changed, 6 insertions, 6 deletions
diff --git a/src/main.cpp b/src/main.cpp
index dfe1e5c97..f34e24abc 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1473,8 +1473,8 @@ int main(int argc, char *argv[])
gui::IGUISkin* skin = guienv->getSkin();
std::string font_path = g_settings->get("font_path");
gui::IGUIFont *font;
- bool use_freetype = g_settings->getBool("freetype");
#if USE_FREETYPE
+ bool use_freetype = g_settings->getBool("freetype");
if (use_freetype) {
std::string fallback;
if (is_yes(gettext("needs_fallback_font")))
@@ -1686,7 +1686,7 @@ int main(int argc, char *argv[])
g_settings->set("port", itos(port));
if((menudata.selected_world >= 0) &&
- (menudata.selected_world < worldspecs.size()))
+ (menudata.selected_world < (int)worldspecs.size()))
g_settings->set("selected_world_path",
worldspecs[menudata.selected_world].path);
@@ -1718,7 +1718,7 @@ int main(int argc, char *argv[])
// Set world path to selected one
if ((menudata.selected_world >= 0) &&
- (menudata.selected_world < worldspecs.size())) {
+ (menudata.selected_world < (int)worldspecs.size())) {
worldspec = worldspecs[menudata.selected_world];
infostream<<"Selected world: "<<worldspec.name
<<" ["<<worldspec.path<<"]"<<std::endl;
diff --git a/src/map.cpp b/src/map.cpp
index 08f255dee..55b758055 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -2827,7 +2827,7 @@ MapBlock* ServerMap::finishBlockMake(BlockMakeData *data,
<<blockpos_requested.Z<<")"<<std::endl;*/
/*
- Update weather data in central blocks if needed
+ Update weather data in blocks
*/
ServerEnvironment *senv = &((Server *)m_gamedef)->getEnv();
if (senv->m_use_weather) {
diff --git a/src/script/lua_api/l_mapgen.cpp b/src/script/lua_api/l_mapgen.cpp
index 14693b43f..822685e34 100644
--- a/src/script/lua_api/l_mapgen.cpp
+++ b/src/script/lua_api/l_mapgen.cpp
@@ -484,7 +484,7 @@ int ModApiMapgen::l_create_schematic(lua_State *L)
v3s16 pos = read_v3s16(L, -1);
lua_pop(L, 1);
- u8 prob = getintfield_default(L, -1, "prob", 0xFF);
+ u8 prob = getintfield_default(L, -1, "prob", MTSCHEM_PROB_ALWAYS);
probability_list.push_back(std::make_pair(pos, prob));
}
diff --git a/src/server.cpp b/src/server.cpp
index 4df2162a7..492ad907b 100644
--- a/src/server.cpp
+++ b/src/server.cpp
@@ -4645,7 +4645,7 @@ void Server::DenyAccess(u16 peer_id, const std::wstring &reason)
client->denied = true;
// If there are way too many clients, get rid of denied new ones immediately
- if(m_clients.size() > 2 * g_settings->getU16("max_users")){
+ if((int)m_clients.size() > 2 * g_settings->getU16("max_users")){
verbosestream<<"Server: DenyAccess: Too many clients; getting rid of "
<<"peer_id="<<peer_id<<" immediately"<<std::endl;
// Delete peer to stop sending it data