# (1: low level shaders; not implemented)
# 2: enable high level shaders
#enable_shaders = 2
+# The time in seconds it takes between repeated
+# right clicks when holding the right mouse button
+#repeat_rightclick_time = 0.25
# will only work for servers which use remote_media setting
# and only for clients compiled with cURL
settings->setDefault("trilinear_filter", "false");
settings->setDefault("preload_item_visuals", "true");
settings->setDefault("enable_shaders", "2");
+ settings->setDefault("repeat_rightclick_time", "0.25");
settings->setDefault("media_fetch_threads", "8");
float time_of_day = 0;
float time_of_day_smooth = 0;
+ float repeat_rightclick_timer = 0;
+
/*
Shader constants
*/
bool left_punch = false;
soundmaker.m_player_leftpunch_sound.name = "";
+ if(input->getRightState())
+ repeat_rightclick_timer += dtime;
+
if(playeritem_usable && input->getLeftState())
{
if(input->getLeftClicked())
camera.setDigging(0); // left click animation
}
- if(input->getRightClicked())
+ if(input->getRightClicked() ||
+ repeat_rightclick_timer >= g_settings->getFloat("repeat_rightclick_time"))
{
+ repeat_rightclick_timer = 0;
infostream<<"Ground right-clicked"<<std::endl;
// Sign special case, at least until formspec is properly implemented.