mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Add enable_pvp setting
This commit is contained in:
parent
34fd47887e
commit
9af0142a36
3 changed files with 9 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue