diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-12-02 12:43:57 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-12-02 12:43:57 +0200 |
commit | b9e8e20c9cb87e441b3998b42f8d7f31c71f8a3f (patch) | |
tree | 9ff91e7afb0a90feb0c5380eee75dbfb51610b40 /src/server.cpp | |
parent | 932988af4650cdd844669d4cd238907409413db6 (diff) | |
download | minetest-b9e8e20c9cb87e441b3998b42f8d7f31c71f8a3f.tar.gz minetest-b9e8e20c9cb87e441b3998b42f8d7f31c71f8a3f.tar.bz2 minetest-b9e8e20c9cb87e441b3998b42f8d7f31c71f8a3f.zip |
Script-defined creative inventory
Diffstat (limited to 'src/server.cpp')
-rw-r--r-- | src/server.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/server.cpp b/src/server.cpp index 3b2b45225..786a3600e 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -33,7 +33,6 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "servercommand.h" #include "filesys.h" #include "content_mapnode.h" -#include "content_craft.h" #include "content_nodemeta.h" #include "mapblock.h" #include "serverobject.h" @@ -4723,7 +4722,8 @@ ServerRemotePlayer *Server::emergePlayer(const char *name, u16 peer_id) player->inventory_backup = new Inventory(); *(player->inventory_backup) = player->inventory; // Set creative inventory - craft_set_creative_inventory(player, this); + player->resetInventory(); + scriptapi_get_creative_inventory(m_lua, player); } return player; @@ -4767,7 +4767,8 @@ ServerRemotePlayer *Server::emergePlayer(const char *name, u16 peer_id) player->inventory_backup = new Inventory(); *(player->inventory_backup) = player->inventory; // Set creative inventory - craft_set_creative_inventory(player, this); + player->resetInventory(); + scriptapi_get_creative_inventory(m_lua, player); } return player; |