build on borders option
This commit is contained in:
parent
d264de084c
commit
f0e9065426
@ -158,4 +158,5 @@
|
||||
# 2 - teleport A works iff it points to clear area containing teleport B, and teleport B points back to teleport A
|
||||
# 3 or more - just like 2 but there can be 3 of more teleports in loop (warning - high value is bad for server performance)
|
||||
#crafted_teleports = 4
|
||||
|
||||
#are players allowed to build connecting to border/edge of hostile clan territory
|
||||
#build_on_borders = false
|
||||
|
@ -110,5 +110,6 @@ void set_default_settings(Settings *settings)
|
||||
settings->setDefault("full_block_send_enable_min_time_from_building", "2.0");
|
||||
settings->setDefault("enable_experimental", "false");
|
||||
settings->setDefault("crafted_teleports", "4");
|
||||
settings->setDefault("build_on_borders", "false");
|
||||
}
|
||||
|
||||
|
@ -2470,8 +2470,11 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
|
||||
u16 item_i = readU16(&data[15]);
|
||||
|
||||
//j,placki
|
||||
if( ( action == 1 && !player->canModify(&m_env.clansManager,&m_env.getMap(),NULL,NULL,&p_over) )
|
||||
||( action != 1 && !player->canModify(&m_env.clansManager,&m_env.getMap(),NULL,NULL,&p_under) ) )
|
||||
bool canModifyOver=player->canModify(&m_env.clansManager,&m_env.getMap(),NULL,NULL,&p_over);
|
||||
bool canModifyUnder=player->canModify(&m_env.clansManager,&m_env.getMap(),NULL,NULL,&p_under);
|
||||
bool canBoB=g_settings->getBool("build_on_borders");
|
||||
if((!canBoB && (!canModifyOver || !canModifyUnder))
|
||||
||(canBoB && ((action == 1 && !canModifyOver) || (action != 1 && !canModifyUnder))) )
|
||||
{
|
||||
derr_server<<"Player isn't owner of a block"<<std::endl;
|
||||
RemoteClient *client = getClient(peer_id);
|
||||
|
Loading…
x
Reference in New Issue
Block a user