Skip to content

Commit

Permalink
Dont dig or place nodes if interact priv is missing (clientside)
Browse files Browse the repository at this point in the history
  • Loading branch information
PilzAdam committed Jun 19, 2013
1 parent 5306602 commit 9b6f1d6
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/game.cpp
Expand Up @@ -2589,7 +2589,8 @@ void the_game(
Handle digging
*/

if(nodig_delay_timer <= 0.0 && input->getLeftState())
if(nodig_delay_timer <= 0.0 && input->getLeftState()
&& client.checkPrivilege("interact"))
{
if(!digging)
{
Expand Down Expand Up @@ -2716,8 +2717,10 @@ void the_game(
camera.setDigging(0); // left click animation
}

if(input->getRightClicked() ||
repeat_rightclick_timer >= g_settings->getFloat("repeat_rightclick_time"))
if((input->getRightClicked() ||
repeat_rightclick_timer >=
g_settings->getFloat("repeat_rightclick_time")) &&
client.checkPrivilege("interact"))
{
repeat_rightclick_timer = 0;
infostream<<"Ground right-clicked"<<std::endl;
Expand Down

0 comments on commit 9b6f1d6

Please sign in to comment.