1
0
Fork 0
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:
Perttu Ahola 2011-12-02 11:25:47 +02:00
parent 34fd47887e
commit 9af0142a36
3 changed files with 9 additions and 0 deletions

View file

@ -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;