1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00:00

Fixed handling of inventory in creative mode (normal inventory is not trashed anymore), fixed mese pick speed, added some forgotten stuff

This commit is contained in:
Perttu Ahola 2011-07-30 23:33:57 +03:00
parent 4ccc99b291
commit 8e1eacf3a8
13 changed files with 89 additions and 3 deletions

View file

@ -4130,6 +4130,11 @@ Player *Server::emergePlayer(const char *name, const char *password, u16 peer_id
// Reset inventory to creative if in creative mode
if(g_settings.getBool("creative_mode"))
{
// Warning: double code below
// Backup actual inventory
player->inventory_backup = new Inventory();
*(player->inventory_backup) = player->inventory;
// Set creative inventory
craft_set_creative_inventory(player);
}
@ -4183,6 +4188,11 @@ Player *Server::emergePlayer(const char *name, const char *password, u16 peer_id
if(g_settings.getBool("creative_mode"))
{
// Warning: double code above
// Backup actual inventory
player->inventory_backup = new Inventory();
*(player->inventory_backup) = player->inventory;
// Set creative inventory
craft_set_creative_inventory(player);
}
else if(g_settings.getBool("give_initial_stuff"))