mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-14 00:55:20 +02:00
Add enable_pvp setting
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user