Skip to content

Commit

Permalink
Add setting draw_wielded_tool and default it to false on sailfish bec…
Browse files Browse the repository at this point in the history
…ause it is drawn in the wrong place in landscape-hacked irrlicht
  • Loading branch information
celeron55 committed Jan 4, 2014
1 parent bd64307 commit 7e8adf3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/defaultsettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ void set_default_settings(Settings *settings)
settings->setDefault("enable_shaders", "true");
settings->setDefault("repeat_rightclick_time", "0.25");
settings->setDefault("enable_particles", "true");
settings->setDefault("draw_wielded_tool", "true");

settings->setDefault("curl_timeout", "5000");
settings->setDefault("curl_parallel_limit", "8");
Expand Down Expand Up @@ -342,6 +343,7 @@ void set_default_settings(Settings *settings)

settings->setDefault("enable_3d_clouds", "false");
settings->setDefault("new_style_leaves", "false");
settings->setDefault("draw_wielded_tool", "false");
#endif
}

Expand Down
3 changes: 2 additions & 1 deletion src/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3308,7 +3308,8 @@ void the_game(
/*
Wielded tool
*/
if(show_hud && (player->hud_flags & HUD_FLAG_WIELDITEM_VISIBLE))
if(show_hud && (player->hud_flags & HUD_FLAG_WIELDITEM_VISIBLE) &&
g_settings->getBool("draw_wielded_tool"))
{
// Warning: This clears the Z buffer.
camera.drawWieldedTool();
Expand Down

0 comments on commit 7e8adf3

Please sign in to comment.