aboutsummaryrefslogtreecommitdiff
path: root/src/serverremoteplayer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/serverremoteplayer.cpp')
-rw-r--r--src/serverremoteplayer.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/serverremoteplayer.cpp b/src/serverremoteplayer.cpp
index bff414e1a..900cc5432 100644
--- a/src/serverremoteplayer.cpp
+++ b/src/serverremoteplayer.cpp
@@ -139,6 +139,12 @@ void ServerRemotePlayer::punch(ServerActiveObject *puncher,
if(!puncher)
return;
+ // No effect if PvP disabled
+ if(g_settings->getBool("enable_pvp") == false){
+ if(puncher->getType() == ACTIVEOBJECT_TYPE_PLAYER)
+ return;
+ }
+
// "Material" properties of a player
MaterialProperties mp;
mp.diggability = DIGGABLE_NORMAL;