projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
db49566
)
if creative mode and player has no build privileges, cannot drop items.
author
Perttu Ahola
<celeron55@gmail.com>
Mon, 22 Aug 2011 19:55:17 +0000
(22:55 +0300)
committer
Perttu Ahola
<celeron55@gmail.com>
Mon, 22 Aug 2011 19:55:17 +0000
(22:55 +0300)
src/server.cpp
patch
|
blob
|
history
diff --git
a/src/server.cpp
b/src/server.cpp
index 97eaa3a3ea48f12c4f876e917b8014fda07f7869..a8eb68c55a95cc5d1fb9d1dd4f1424404d9cc32c 100644
(file)
--- 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"<<std::endl;
+ return;
+ }
+
dout_server<<"Placing a miscellaneous item on map"
<<std::endl;