From: Perttu Ahola Date: Mon, 22 Aug 2011 19:55:17 +0000 (+0300) Subject: if creative mode and player has no build privileges, cannot drop items. X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=d4df20a913c6663a4f42294e06e8c482fc947259;p=zefram%2Fminetest%2Fminetest_engine.git if creative mode and player has no build privileges, cannot drop items. --- diff --git a/src/server.cpp b/src/server.cpp index 97eaa3a3..a8eb68c5 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -2923,6 +2923,18 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id) return; } + /* + If in creative mode, item dropping is disabled unless + player has build privileges + */ + if(g_settings.getBool("creative_mode") && + (getPlayerPrivs(player) & PRIV_BUILD) == 0) + { + derr_server<<"Not allowing player to drop item: " + "creative mode and no build privs"<