Merge remote-tracking branch 'origin/upstream'
@ -22,3 +22,4 @@ CPackSourceConfig.cmake
|
|||||||
Makefile
|
Makefile
|
||||||
cmake_install.cmake
|
cmake_install.cmake
|
||||||
src/jthread/libjthread.a
|
src/jthread/libjthread.a
|
||||||
|
data_temp/*
|
||||||
|
12
.hgtags
@ -16,3 +16,15 @@ dd08a9b5cb84d55b7576bb3fde3068dd263bc3bc 0.2.20110618_0_dev
|
|||||||
0000000000000000000000000000000000000000 0.2.20110704_0
|
0000000000000000000000000000000000000000 0.2.20110704_0
|
||||||
0000000000000000000000000000000000000000 0.2.20110704_0
|
0000000000000000000000000000000000000000 0.2.20110704_0
|
||||||
65263ec55caf526e3f3e0bdc6657ce42daee46bc 0.2.20110704_0
|
65263ec55caf526e3f3e0bdc6657ce42daee46bc 0.2.20110704_0
|
||||||
|
06c62112b503e746d5d8cc40f951974447d590b7 0.2.20110731_0
|
||||||
|
705a7e95b8710c8cada5524d8c7bb658f4b710d9 0.2.20110731_1
|
||||||
|
4a6cf9491306988b24c79438ee6398885c432fce 0.2.20110731_2
|
||||||
|
4a6cf9491306988b24c79438ee6398885c432fce 0.2.20110731_2
|
||||||
|
0000000000000000000000000000000000000000 0.2.20110731_2
|
||||||
|
0000000000000000000000000000000000000000 0.2.20110731_2
|
||||||
|
8ad16fbce9a4da45b2552ad8b400a5a127722acc 0.2.20110731_2
|
||||||
|
c87e28deaabf4a776c261b3a09b6bf5ea3e04abf 0.2.20110731_3
|
||||||
|
c87e28deaabf4a776c261b3a09b6bf5ea3e04abf 0.2.20110731_3
|
||||||
|
0000000000000000000000000000000000000000 0.2.20110731_3
|
||||||
|
0000000000000000000000000000000000000000 0.2.20110731_3
|
||||||
|
b277d01700f640b0ba2684a8ead3b7169a4a8175 0.2.20110731_3
|
||||||
|
@ -9,7 +9,7 @@ project(minetest-delta)
|
|||||||
|
|
||||||
set(VERSION_MAJOR 0)
|
set(VERSION_MAJOR 0)
|
||||||
set(VERSION_MINOR 2)
|
set(VERSION_MINOR 2)
|
||||||
set(VERSION_PATCH 20110730_rc1)
|
set(VERSION_PATCH 20110731_3)
|
||||||
set(VERSION_STRING "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
|
set(VERSION_STRING "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
|
||||||
|
|
||||||
# Configuration options
|
# Configuration options
|
||||||
@ -21,7 +21,11 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(BUILD_CLIENT 1 CACHE BOOL "Build client")
|
set(BUILD_CLIENT 1 CACHE BOOL "Build client")
|
||||||
set(BUILD_SERVER 1 CACHE BOOL "Build server")
|
if(WIN32)
|
||||||
|
set(BUILD_SERVER 0 CACHE BOOL "Build server")
|
||||||
|
else()
|
||||||
|
set(BUILD_SERVER 1 CACHE BOOL "Build server")
|
||||||
|
endif()
|
||||||
|
|
||||||
set(WARN_ALL 1 CACHE BOOL "Enable -Wall for Release build")
|
set(WARN_ALL 1 CACHE BOOL "Enable -Wall for Release build")
|
||||||
|
|
||||||
@ -60,6 +64,7 @@ elseif(UNIX) # Linux, BSD etc
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
install(FILES "doc/README.txt" DESTINATION "${DOCDIR}")
|
install(FILES "doc/README.txt" DESTINATION "${DOCDIR}")
|
||||||
|
install(FILES "doc/changelog.txt" DESTINATION "${DOCDIR}")
|
||||||
install(FILES "minetest.conf.example" DESTINATION "${DOCDIR}")
|
install(FILES "minetest.conf.example" DESTINATION "${DOCDIR}")
|
||||||
|
|
||||||
#
|
#
|
||||||
|
BIN
data/cooked_rat.png
Normal file
After Width: | Height: | Size: 239 B |
BIN
data/nc_back.png
Normal file
After Width: | Height: | Size: 303 B |
BIN
data/nc_front.png
Normal file
After Width: | Height: | Size: 410 B |
BIN
data/nc_rb.png
Normal file
After Width: | Height: | Size: 203 B |
BIN
data/nc_side.png
Normal file
After Width: | Height: | Size: 260 B |
BIN
data/scorched_stuff.png
Normal file
After Width: | Height: | Size: 233 B |
BIN
data/tool_steelsword.png
Normal file
After Width: | Height: | Size: 291 B |
BIN
data/tool_stonesword.png
Normal file
After Width: | Height: | Size: 301 B |
BIN
data/tool_woodsword.png
Normal file
After Width: | Height: | Size: 255 B |
@ -3,6 +3,27 @@ Minetest-c55 changelog
|
|||||||
This should contain all the major changes.
|
This should contain all the major changes.
|
||||||
For minor stuff, refer to the commit log of the repository.
|
For minor stuff, refer to the commit log of the repository.
|
||||||
|
|
||||||
|
2011-07-31_3:
|
||||||
|
- Fixes a bug that made the server to deny non-empty passwords from players connecting the first time
|
||||||
|
|
||||||
|
2011-07-31_2:
|
||||||
|
- Fixes a bug that caused the server to always read an empty password from the client when a client connected.
|
||||||
|
|
||||||
|
2011-07-31:
|
||||||
|
- A number of small fixes, build system stuff and such (refer to version control log)
|
||||||
|
- Map generator no longer crashes at generation limit
|
||||||
|
- Fixed mapgen producing lots of cut-down trees
|
||||||
|
- Some minor tweaks in map generator (some contributed)
|
||||||
|
- Volumetric clouds (contributed)
|
||||||
|
- Icon added (graphic contributed)
|
||||||
|
- Key configuration menu (contributed)
|
||||||
|
- Decorative blocks and items: bookshelf, sandstone, cactus, clay, brick, papyrus, rail, paper, book (contributed)
|
||||||
|
- Jungles!
|
||||||
|
- Hotbar is a bit smaller
|
||||||
|
- Health is now enabled by default; You can now eat cooked rats to heal yourself.
|
||||||
|
- Finally added sword textures, altough sword is still of no use
|
||||||
|
- Creative mode now preserves normal mode inventory
|
||||||
|
|
||||||
2011-07-04:
|
2011-07-04:
|
||||||
- Many small fixes
|
- Many small fixes
|
||||||
- Code reorganizing to aid further development
|
- Code reorganizing to aid further development
|
||||||
|
BIN
minetest-icon.ico
Normal file
After Width: | Height: | Size: 9.4 KiB |
@ -95,6 +95,8 @@ screenH# = 600
|
|||||||
#invert_mouse = false
|
#invert_mouse = false
|
||||||
# FarMesh thingy
|
# FarMesh thingy
|
||||||
#enable_farmesh = false
|
#enable_farmesh = false
|
||||||
|
#farmesh_trees = true
|
||||||
|
#farmesh_distance = 40
|
||||||
# Enable/disable clouds
|
# Enable/disable clouds
|
||||||
#enable_clouds = true
|
#enable_clouds = true
|
||||||
# Don't draw stone (for testing)
|
# Don't draw stone (for testing)
|
||||||
@ -108,9 +110,8 @@ screenH# = 600
|
|||||||
|
|
||||||
# Map directory (everything in the world is stored here)
|
# Map directory (everything in the world is stored here)
|
||||||
#map-#dir = /custom/map
|
#map-#dir = /custom/map
|
||||||
# Set to true to enable experimental features or stuff that is tested
|
# Message of the Day
|
||||||
# (varies from version to version, usually not useful at all)
|
#motd = Welcome to this awesome Minetest server!
|
||||||
#enable_experimental = false
|
|
||||||
# Set to true to enable creative mode (unlimited inventory)
|
# Set to true to enable creative mode (unlimited inventory)
|
||||||
#creative_mode = false
|
#creative_mode = false
|
||||||
#enable_damage = false
|
#enable_damage = false
|
||||||
@ -119,10 +120,13 @@ screenH# = 600
|
|||||||
#default_password =
|
#default_password =
|
||||||
# Available privileges: build, teleport, settime, privs, shout
|
# Available privileges: build, teleport, settime, privs, shout
|
||||||
#default_privs = build, shout
|
#default_privs = build, shout
|
||||||
|
|
||||||
|
# Set to true to enable experimental features or stuff that is tested
|
||||||
|
# (varies from version to version, usually not useful at all)
|
||||||
|
#enable_experimental = false
|
||||||
# Profiler data print interval. #0 = disable.
|
# Profiler data print interval. #0 = disable.
|
||||||
#profiler_print_interval = 0
|
#profiler_print_interval = 0
|
||||||
#enable_mapgen_debug_info = false
|
#enable_mapgen_debug_info = false
|
||||||
|
|
||||||
# Player and object positions are sent at intervals specified by this
|
# Player and object positions are sent at intervals specified by this
|
||||||
#objectdata_interval = 0.2
|
#objectdata_interval = 0.2
|
||||||
#active_object_range = 2
|
#active_object_range = 2
|
||||||
|
@ -129,6 +129,11 @@ set(common_SRCS
|
|||||||
base64.cpp
|
base64.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# This gives us the icon
|
||||||
|
if(WIN32 AND MSVC)
|
||||||
|
set(common_SRCS ${common_SRCS} winresource.rc)
|
||||||
|
endif()
|
||||||
|
|
||||||
# Client sources
|
# Client sources
|
||||||
set(minetest_SRCS
|
set(minetest_SRCS
|
||||||
${common_SRCS}
|
${common_SRCS}
|
||||||
|
@ -424,7 +424,7 @@ void Client::step(float dtime)
|
|||||||
memset((char*)&data[3], 0, PLAYERNAME_SIZE);
|
memset((char*)&data[3], 0, PLAYERNAME_SIZE);
|
||||||
snprintf((char*)&data[3], PLAYERNAME_SIZE, "%s", myplayer->getName());
|
snprintf((char*)&data[3], PLAYERNAME_SIZE, "%s", myplayer->getName());
|
||||||
|
|
||||||
/*dstream<<"Client: password hash is \""<<m_password<<"\""
|
/*dstream<<"Client: sending initial password hash: \""<<m_password<<"\""
|
||||||
<<std::endl;*/
|
<<std::endl;*/
|
||||||
|
|
||||||
memset((char*)&data[23], 0, PASSWORD_SIZE);
|
memset((char*)&data[23], 0, PASSWORD_SIZE);
|
||||||
|
@ -31,7 +31,7 @@ void setStoneLikeDiggingProperties(DiggingPropertiesList &list, float toughness)
|
|||||||
void setDirtLikeDiggingProperties(DiggingPropertiesList &list, float toughness);
|
void setDirtLikeDiggingProperties(DiggingPropertiesList &list, float toughness);
|
||||||
void setWoodLikeDiggingProperties(DiggingPropertiesList &list, float toughness);
|
void setWoodLikeDiggingProperties(DiggingPropertiesList &list, float toughness);
|
||||||
|
|
||||||
content_t trans_table_19[][2] = {
|
content_t trans_table_19[21][2] = {
|
||||||
{CONTENT_GRASS, 1},
|
{CONTENT_GRASS, 1},
|
||||||
{CONTENT_TREE, 4},
|
{CONTENT_TREE, 4},
|
||||||
{CONTENT_LEAVES, 5},
|
{CONTENT_LEAVES, 5},
|
||||||
@ -106,7 +106,7 @@ void content_mapnode_init()
|
|||||||
f->setInventoryTextureCube("stone.png", "stone.png", "stone.png");
|
f->setInventoryTextureCube("stone.png", "stone.png", "stone.png");
|
||||||
f->param_type = CPT_MINERAL;
|
f->param_type = CPT_MINERAL;
|
||||||
f->is_ground_content = true;
|
f->is_ground_content = true;
|
||||||
f->dug_item = std::string("MaterialItem ")+itos(CONTENT_COBBLE)+" 1";
|
f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_COBBLE)+" 1";
|
||||||
setStoneLikeDiggingProperties(f->digging_properties, 1.0);
|
setStoneLikeDiggingProperties(f->digging_properties, 1.0);
|
||||||
if(invisible_stone)
|
if(invisible_stone)
|
||||||
f->solidness = 0; // For debugging, hides regular stone
|
f->solidness = 0; // For debugging, hides regular stone
|
||||||
@ -118,7 +118,7 @@ void content_mapnode_init()
|
|||||||
f->setTexture(1, "mud.png");
|
f->setTexture(1, "mud.png");
|
||||||
f->param_type = CPT_MINERAL;
|
f->param_type = CPT_MINERAL;
|
||||||
f->is_ground_content = true;
|
f->is_ground_content = true;
|
||||||
f->dug_item = std::string("MaterialItem ")+itos(CONTENT_MUD)+" 1";
|
f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_MUD)+" 1";
|
||||||
setDirtLikeDiggingProperties(f->digging_properties, 1.0);
|
setDirtLikeDiggingProperties(f->digging_properties, 1.0);
|
||||||
|
|
||||||
i = CONTENT_GRASS_FOOTSTEPS;
|
i = CONTENT_GRASS_FOOTSTEPS;
|
||||||
@ -128,7 +128,7 @@ void content_mapnode_init()
|
|||||||
f->setTexture(1, "mud.png");
|
f->setTexture(1, "mud.png");
|
||||||
f->param_type = CPT_MINERAL;
|
f->param_type = CPT_MINERAL;
|
||||||
f->is_ground_content = true;
|
f->is_ground_content = true;
|
||||||
f->dug_item = std::string("MaterialItem ")+itos(CONTENT_MUD)+" 1";
|
f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_MUD)+" 1";
|
||||||
setDirtLikeDiggingProperties(f->digging_properties, 1.0);
|
setDirtLikeDiggingProperties(f->digging_properties, 1.0);
|
||||||
|
|
||||||
i = CONTENT_MUD;
|
i = CONTENT_MUD;
|
||||||
@ -137,7 +137,7 @@ void content_mapnode_init()
|
|||||||
f->setInventoryTextureCube("mud.png", "mud.png", "mud.png");
|
f->setInventoryTextureCube("mud.png", "mud.png", "mud.png");
|
||||||
f->param_type = CPT_MINERAL;
|
f->param_type = CPT_MINERAL;
|
||||||
f->is_ground_content = true;
|
f->is_ground_content = true;
|
||||||
f->dug_item = std::string("MaterialItem ")+itos(i)+" 1";
|
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||||
setDirtLikeDiggingProperties(f->digging_properties, 1.0);
|
setDirtLikeDiggingProperties(f->digging_properties, 1.0);
|
||||||
|
|
||||||
i = CONTENT_SAND;
|
i = CONTENT_SAND;
|
||||||
@ -146,7 +146,7 @@ void content_mapnode_init()
|
|||||||
f->setInventoryTextureCube("sand.png", "sand.png", "sand.png");
|
f->setInventoryTextureCube("sand.png", "sand.png", "sand.png");
|
||||||
f->param_type = CPT_MINERAL;
|
f->param_type = CPT_MINERAL;
|
||||||
f->is_ground_content = true;
|
f->is_ground_content = true;
|
||||||
f->dug_item = std::string("MaterialItem ")+itos(i)+" 1";
|
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||||
setDirtLikeDiggingProperties(f->digging_properties, 1.0);
|
setDirtLikeDiggingProperties(f->digging_properties, 1.0);
|
||||||
|
|
||||||
i = CONTENT_GRAVEL;
|
i = CONTENT_GRAVEL;
|
||||||
@ -155,7 +155,7 @@ void content_mapnode_init()
|
|||||||
f->setInventoryTextureCube("gravel.png", "gravel.png", "gravel.png");
|
f->setInventoryTextureCube("gravel.png", "gravel.png", "gravel.png");
|
||||||
f->param_type = CPT_MINERAL;
|
f->param_type = CPT_MINERAL;
|
||||||
f->is_ground_content = true;
|
f->is_ground_content = true;
|
||||||
f->dug_item = std::string("MaterialItem ")+itos(i)+" 1";
|
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||||
setDirtLikeDiggingProperties(f->digging_properties, 1.75);
|
setDirtLikeDiggingProperties(f->digging_properties, 1.75);
|
||||||
|
|
||||||
i = CONTENT_SANDSTONE;
|
i = CONTENT_SANDSTONE;
|
||||||
@ -164,7 +164,7 @@ void content_mapnode_init()
|
|||||||
f->setInventoryTextureCube("sandstone.png", "sandstone.png", "sandstone.png");
|
f->setInventoryTextureCube("sandstone.png", "sandstone.png", "sandstone.png");
|
||||||
f->param_type = CPT_MINERAL;
|
f->param_type = CPT_MINERAL;
|
||||||
f->is_ground_content = true;
|
f->is_ground_content = true;
|
||||||
f->dug_item = std::string("MaterialItem ")+itos(CONTENT_SAND)+" 1";
|
f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_SAND)+" 1";
|
||||||
setDirtLikeDiggingProperties(f->digging_properties, 1.0);
|
setDirtLikeDiggingProperties(f->digging_properties, 1.0);
|
||||||
|
|
||||||
i = CONTENT_CLAY;
|
i = CONTENT_CLAY;
|
||||||
@ -192,7 +192,7 @@ void content_mapnode_init()
|
|||||||
f->setTexture(1, "tree_top.png");
|
f->setTexture(1, "tree_top.png");
|
||||||
f->param_type = CPT_MINERAL;
|
f->param_type = CPT_MINERAL;
|
||||||
f->is_ground_content = true;
|
f->is_ground_content = true;
|
||||||
f->dug_item = std::string("MaterialItem ")+itos(i)+" 1";
|
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||||
setWoodLikeDiggingProperties(f->digging_properties, 1.0);
|
setWoodLikeDiggingProperties(f->digging_properties, 1.0);
|
||||||
|
|
||||||
i = CONTENT_JUNGLETREE;
|
i = CONTENT_JUNGLETREE;
|
||||||
@ -202,7 +202,7 @@ void content_mapnode_init()
|
|||||||
f->setTexture(1, "jungletree_top.png");
|
f->setTexture(1, "jungletree_top.png");
|
||||||
f->param_type = CPT_MINERAL;
|
f->param_type = CPT_MINERAL;
|
||||||
//f->is_ground_content = true;
|
//f->is_ground_content = true;
|
||||||
f->dug_item = std::string("MaterialItem ")+itos(i)+" 1";
|
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||||
setWoodLikeDiggingProperties(f->digging_properties, 1.0);
|
setWoodLikeDiggingProperties(f->digging_properties, 1.0);
|
||||||
|
|
||||||
i = CONTENT_JUNGLEGRASS;
|
i = CONTENT_JUNGLEGRASS;
|
||||||
@ -212,7 +212,7 @@ void content_mapnode_init()
|
|||||||
f->param_type = CPT_LIGHT;
|
f->param_type = CPT_LIGHT;
|
||||||
//f->is_ground_content = true;
|
//f->is_ground_content = true;
|
||||||
f->air_equivalent = false; // grass grows underneath
|
f->air_equivalent = false; // grass grows underneath
|
||||||
f->dug_item = std::string("MaterialItem ")+itos(i)+" 1";
|
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||||
f->solidness = 0; // drawn separately, makes no faces
|
f->solidness = 0; // drawn separately, makes no faces
|
||||||
f->walkable = false;
|
f->walkable = false;
|
||||||
setWoodLikeDiggingProperties(f->digging_properties, 0.10);
|
setWoodLikeDiggingProperties(f->digging_properties, 0.10);
|
||||||
@ -232,7 +232,7 @@ void content_mapnode_init()
|
|||||||
{
|
{
|
||||||
f->setAllTextures("[noalpha:leaves.png");
|
f->setAllTextures("[noalpha:leaves.png");
|
||||||
}
|
}
|
||||||
f->dug_item = std::string("MaterialItem ")+itos(i)+" 1";
|
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||||
setWoodLikeDiggingProperties(f->digging_properties, 0.15);
|
setWoodLikeDiggingProperties(f->digging_properties, 0.15);
|
||||||
|
|
||||||
i = CONTENT_CACTUS;
|
i = CONTENT_CACTUS;
|
||||||
@ -243,7 +243,7 @@ void content_mapnode_init()
|
|||||||
f->setInventoryTextureCube("cactus_top.png", "cactus_side.png", "cactus_side.png");
|
f->setInventoryTextureCube("cactus_top.png", "cactus_side.png", "cactus_side.png");
|
||||||
f->param_type = CPT_MINERAL;
|
f->param_type = CPT_MINERAL;
|
||||||
f->is_ground_content = true;
|
f->is_ground_content = true;
|
||||||
f->dug_item = std::string("MaterialItem ")+itos(i)+" 1";
|
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||||
setWoodLikeDiggingProperties(f->digging_properties, 0.75);
|
setWoodLikeDiggingProperties(f->digging_properties, 0.75);
|
||||||
|
|
||||||
i = CONTENT_PAPYRUS;
|
i = CONTENT_PAPYRUS;
|
||||||
@ -252,7 +252,7 @@ void content_mapnode_init()
|
|||||||
f->light_propagates = true;
|
f->light_propagates = true;
|
||||||
f->param_type = CPT_LIGHT;
|
f->param_type = CPT_LIGHT;
|
||||||
f->is_ground_content = true;
|
f->is_ground_content = true;
|
||||||
f->dug_item = std::string("MaterialItem ")+itos(i)+" 1";
|
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||||
f->solidness = 0; // drawn separately, makes no faces
|
f->solidness = 0; // drawn separately, makes no faces
|
||||||
f->walkable = false;
|
f->walkable = false;
|
||||||
setWoodLikeDiggingProperties(f->digging_properties, 0.25);
|
setWoodLikeDiggingProperties(f->digging_properties, 0.25);
|
||||||
@ -275,7 +275,7 @@ void content_mapnode_init()
|
|||||||
f->sunlight_propagates = true;
|
f->sunlight_propagates = true;
|
||||||
f->param_type = CPT_LIGHT;
|
f->param_type = CPT_LIGHT;
|
||||||
f->is_ground_content = true;
|
f->is_ground_content = true;
|
||||||
f->dug_item = std::string("MaterialItem ")+itos(i)+" 1";
|
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||||
f->solidness = 0; // drawn separately, makes no faces
|
f->solidness = 0; // drawn separately, makes no faces
|
||||||
f->setInventoryTextureCube("glass.png", "glass.png", "glass.png");
|
f->setInventoryTextureCube("glass.png", "glass.png", "glass.png");
|
||||||
setWoodLikeDiggingProperties(f->digging_properties, 0.15);
|
setWoodLikeDiggingProperties(f->digging_properties, 0.15);
|
||||||
@ -285,7 +285,7 @@ void content_mapnode_init()
|
|||||||
f->light_propagates = true;
|
f->light_propagates = true;
|
||||||
f->param_type = CPT_LIGHT;
|
f->param_type = CPT_LIGHT;
|
||||||
f->is_ground_content = true;
|
f->is_ground_content = true;
|
||||||
f->dug_item = std::string("MaterialItem ")+itos(i)+" 1";
|
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||||
f->solidness = 0; // drawn separately, makes no faces
|
f->solidness = 0; // drawn separately, makes no faces
|
||||||
f->air_equivalent = true; // grass grows underneath
|
f->air_equivalent = true; // grass grows underneath
|
||||||
f->setInventoryTexture("item_fence.png");
|
f->setInventoryTexture("item_fence.png");
|
||||||
@ -297,7 +297,7 @@ void content_mapnode_init()
|
|||||||
f->light_propagates = true;
|
f->light_propagates = true;
|
||||||
f->param_type = CPT_LIGHT;
|
f->param_type = CPT_LIGHT;
|
||||||
f->is_ground_content = true;
|
f->is_ground_content = true;
|
||||||
f->dug_item = std::string("MaterialItem ")+itos(i)+" 1";
|
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||||
f->solidness = 0; // drawn separately, makes no faces
|
f->solidness = 0; // drawn separately, makes no faces
|
||||||
f->air_equivalent = true; // grass grows underneath
|
f->air_equivalent = true; // grass grows underneath
|
||||||
f->walkable = false;
|
f->walkable = false;
|
||||||
@ -315,7 +315,7 @@ void content_mapnode_init()
|
|||||||
f->setAllTextures("wood.png");
|
f->setAllTextures("wood.png");
|
||||||
f->setInventoryTextureCube("wood.png", "wood.png", "wood.png");
|
f->setInventoryTextureCube("wood.png", "wood.png", "wood.png");
|
||||||
f->is_ground_content = true;
|
f->is_ground_content = true;
|
||||||
f->dug_item = std::string("MaterialItem ")+itos(i)+" 1";
|
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||||
setWoodLikeDiggingProperties(f->digging_properties, 0.75);
|
setWoodLikeDiggingProperties(f->digging_properties, 0.75);
|
||||||
|
|
||||||
i = CONTENT_MESE;
|
i = CONTENT_MESE;
|
||||||
@ -323,7 +323,7 @@ void content_mapnode_init()
|
|||||||
f->setAllTextures("mese.png");
|
f->setAllTextures("mese.png");
|
||||||
f->setInventoryTextureCube("mese.png", "mese.png", "mese.png");
|
f->setInventoryTextureCube("mese.png", "mese.png", "mese.png");
|
||||||
f->is_ground_content = true;
|
f->is_ground_content = true;
|
||||||
f->dug_item = std::string("MaterialItem ")+itos(i)+" 1";
|
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||||
setStoneLikeDiggingProperties(f->digging_properties, 0.5);
|
setStoneLikeDiggingProperties(f->digging_properties, 0.5);
|
||||||
|
|
||||||
i = CONTENT_CLOUD;
|
i = CONTENT_CLOUD;
|
||||||
@ -331,7 +331,7 @@ void content_mapnode_init()
|
|||||||
f->setAllTextures("cloud.png");
|
f->setAllTextures("cloud.png");
|
||||||
f->setInventoryTextureCube("cloud.png", "cloud.png", "cloud.png");
|
f->setInventoryTextureCube("cloud.png", "cloud.png", "cloud.png");
|
||||||
f->is_ground_content = true;
|
f->is_ground_content = true;
|
||||||
f->dug_item = std::string("MaterialItem ")+itos(i)+" 1";
|
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||||
|
|
||||||
i = CONTENT_AIR;
|
i = CONTENT_AIR;
|
||||||
f = &content_features(i);
|
f = &content_features(i);
|
||||||
@ -387,7 +387,7 @@ void content_mapnode_init()
|
|||||||
f->diggable = false;
|
f->diggable = false;
|
||||||
f->buildable_to = true;
|
f->buildable_to = true;
|
||||||
f->liquid_type = LIQUID_SOURCE;
|
f->liquid_type = LIQUID_SOURCE;
|
||||||
f->dug_item = std::string("MaterialItem ")+itos(i)+" 1";
|
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||||
f->liquid_alternative_flowing = CONTENT_WATER;
|
f->liquid_alternative_flowing = CONTENT_WATER;
|
||||||
f->liquid_alternative_source = CONTENT_WATERSOURCE;
|
f->liquid_alternative_source = CONTENT_WATERSOURCE;
|
||||||
|
|
||||||
@ -401,7 +401,7 @@ void content_mapnode_init()
|
|||||||
f->walkable = false;
|
f->walkable = false;
|
||||||
f->wall_mounted = true;
|
f->wall_mounted = true;
|
||||||
f->air_equivalent = true;
|
f->air_equivalent = true;
|
||||||
f->dug_item = std::string("MaterialItem ")+itos(i)+" 1";
|
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||||
f->light_source = LIGHT_MAX-1;
|
f->light_source = LIGHT_MAX-1;
|
||||||
f->digging_properties.set("", DiggingProperties(true, 0.0, 0));
|
f->digging_properties.set("", DiggingProperties(true, 0.0, 0));
|
||||||
|
|
||||||
@ -415,7 +415,7 @@ void content_mapnode_init()
|
|||||||
f->walkable = false;
|
f->walkable = false;
|
||||||
f->wall_mounted = true;
|
f->wall_mounted = true;
|
||||||
f->air_equivalent = true;
|
f->air_equivalent = true;
|
||||||
f->dug_item = std::string("MaterialItem ")+itos(i)+" 1";
|
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||||
if(f->initial_metadata == NULL)
|
if(f->initial_metadata == NULL)
|
||||||
f->initial_metadata = new SignNodeMetadata("Some sign");
|
f->initial_metadata = new SignNodeMetadata("Some sign");
|
||||||
f->digging_properties.set("", DiggingProperties(true, 0.5, 0));
|
f->digging_properties.set("", DiggingProperties(true, 0.5, 0));
|
||||||
@ -429,7 +429,7 @@ void content_mapnode_init()
|
|||||||
f->setTexture(5, "chest_front.png"); // Z-
|
f->setTexture(5, "chest_front.png"); // Z-
|
||||||
f->setInventoryTexture("chest_top.png");
|
f->setInventoryTexture("chest_top.png");
|
||||||
//f->setInventoryTextureCube("chest_top.png", "chest_side.png", "chest_side.png");
|
//f->setInventoryTextureCube("chest_top.png", "chest_side.png", "chest_side.png");
|
||||||
f->dug_item = std::string("MaterialItem ")+itos(i)+" 1";
|
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||||
if(f->initial_metadata == NULL)
|
if(f->initial_metadata == NULL)
|
||||||
f->initial_metadata = new ChestNodeMetadata();
|
f->initial_metadata = new ChestNodeMetadata();
|
||||||
setWoodLikeDiggingProperties(f->digging_properties, 1.0);
|
setWoodLikeDiggingProperties(f->digging_properties, 1.0);
|
||||||
@ -440,8 +440,8 @@ void content_mapnode_init()
|
|||||||
f->setAllTextures("furnace_side.png");
|
f->setAllTextures("furnace_side.png");
|
||||||
f->setTexture(5, "furnace_front.png"); // Z-
|
f->setTexture(5, "furnace_front.png"); // Z-
|
||||||
f->setInventoryTexture("furnace_front.png");
|
f->setInventoryTexture("furnace_front.png");
|
||||||
//f->dug_item = std::string("MaterialItem ")+itos(i)+" 1";
|
//f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||||
f->dug_item = std::string("MaterialItem ")+itos(CONTENT_COBBLE)+" 6";
|
f->dug_item = std::string("MaterialItem2 ")+itos(CONTENT_COBBLE)+" 6";
|
||||||
if(f->initial_metadata == NULL)
|
if(f->initial_metadata == NULL)
|
||||||
f->initial_metadata = new FurnaceNodeMetadata();
|
f->initial_metadata = new FurnaceNodeMetadata();
|
||||||
setStoneLikeDiggingProperties(f->digging_properties, 3.0);
|
setStoneLikeDiggingProperties(f->digging_properties, 3.0);
|
||||||
@ -452,7 +452,7 @@ void content_mapnode_init()
|
|||||||
f->setInventoryTextureCube("cobble.png", "cobble.png", "cobble.png");
|
f->setInventoryTextureCube("cobble.png", "cobble.png", "cobble.png");
|
||||||
f->param_type = CPT_NONE;
|
f->param_type = CPT_NONE;
|
||||||
f->is_ground_content = true;
|
f->is_ground_content = true;
|
||||||
f->dug_item = std::string("MaterialItem ")+itos(i)+" 1";
|
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||||
setStoneLikeDiggingProperties(f->digging_properties, 0.9);
|
setStoneLikeDiggingProperties(f->digging_properties, 0.9);
|
||||||
|
|
||||||
i = CONTENT_MOSSYCOBBLE;
|
i = CONTENT_MOSSYCOBBLE;
|
||||||
@ -461,7 +461,7 @@ void content_mapnode_init()
|
|||||||
f->setInventoryTextureCube("mossycobble.png", "mossycobble.png", "mossycobble.png");
|
f->setInventoryTextureCube("mossycobble.png", "mossycobble.png", "mossycobble.png");
|
||||||
f->param_type = CPT_NONE;
|
f->param_type = CPT_NONE;
|
||||||
f->is_ground_content = true;
|
f->is_ground_content = true;
|
||||||
f->dug_item = std::string("MaterialItem ")+itos(i)+" 1";
|
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||||
setStoneLikeDiggingProperties(f->digging_properties, 0.8);
|
setStoneLikeDiggingProperties(f->digging_properties, 0.8);
|
||||||
|
|
||||||
i = CONTENT_STEEL;
|
i = CONTENT_STEEL;
|
||||||
@ -471,16 +471,33 @@ void content_mapnode_init()
|
|||||||
"steel_block.png");
|
"steel_block.png");
|
||||||
f->param_type = CPT_NONE;
|
f->param_type = CPT_NONE;
|
||||||
f->is_ground_content = true;
|
f->is_ground_content = true;
|
||||||
f->dug_item = std::string("MaterialItem ")+itos(i)+" 1";
|
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||||
setStoneLikeDiggingProperties(f->digging_properties, 5.0);
|
setStoneLikeDiggingProperties(f->digging_properties, 5.0);
|
||||||
|
|
||||||
|
i = CONTENT_NC;
|
||||||
|
f = &content_features(i);
|
||||||
|
f->param_type = CPT_FACEDIR_SIMPLE;
|
||||||
|
f->setAllTextures("nc_side.png");
|
||||||
|
f->setTexture(5, "nc_front.png"); // Z-
|
||||||
|
f->setTexture(4, "nc_back.png"); // Z+
|
||||||
|
f->setInventoryTexture("nc_front.png");
|
||||||
|
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||||
|
setStoneLikeDiggingProperties(f->digging_properties, 3.0);
|
||||||
|
|
||||||
|
i = CONTENT_NC_RB;
|
||||||
|
f = &content_features(i);
|
||||||
|
f->setAllTextures("nc_rb.png");
|
||||||
|
f->setInventoryTexture("nc_rb.png");
|
||||||
|
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||||
|
setStoneLikeDiggingProperties(f->digging_properties, 3.0);
|
||||||
|
|
||||||
// NOTE: Remember to add frequently used stuff to the texture atlas in tile.cpp
|
// NOTE: Remember to add frequently used stuff to the texture atlas in tile.cpp
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Add MesePick to everything
|
Add MesePick to everything
|
||||||
*/
|
*/
|
||||||
for(u16 i=0; i<256; i++)
|
for(u16 i=0; i<=MAX_CONTENT; i++)
|
||||||
{
|
{
|
||||||
content_features(i).digging_properties.set("MesePick",
|
content_features(i).digging_properties.set("MesePick",
|
||||||
DiggingProperties(true, 0.0, 65535./1337));
|
DiggingProperties(true, 0.0, 65535./1337));
|
||||||
|
@ -24,6 +24,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
|
|
||||||
void content_mapnode_init();
|
void content_mapnode_init();
|
||||||
|
|
||||||
|
extern content_t trans_table_19[21][2];
|
||||||
|
|
||||||
MapNode mapnode_translate_from_internal(MapNode n_from, u8 version);
|
MapNode mapnode_translate_from_internal(MapNode n_from, u8 version);
|
||||||
MapNode mapnode_translate_to_internal(MapNode n_from, u8 version);
|
MapNode mapnode_translate_to_internal(MapNode n_from, u8 version);
|
||||||
|
|
||||||
@ -70,6 +72,8 @@ MapNode mapnode_translate_to_internal(MapNode n_from, u8 version);
|
|||||||
#define CONTENT_BOOKSHELF 0x814 //29
|
#define CONTENT_BOOKSHELF 0x814 //29
|
||||||
#define CONTENT_JUNGLETREE 0x815
|
#define CONTENT_JUNGLETREE 0x815
|
||||||
#define CONTENT_JUNGLEGRASS 0x816
|
#define CONTENT_JUNGLEGRASS 0x816
|
||||||
|
#define CONTENT_NC 0x817
|
||||||
|
#define CONTENT_NC_RB 0x818
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -77,7 +77,7 @@ void set_default_settings()
|
|||||||
g_settings.setDefault("screenshot_path", ".");
|
g_settings.setDefault("screenshot_path", ".");
|
||||||
|
|
||||||
// Server stuff
|
// Server stuff
|
||||||
g_settings.setDefault("motd", "<Message of the day (motd) not set>");
|
g_settings.setDefault("motd", "");
|
||||||
g_settings.setDefault("enable_experimental", "false");
|
g_settings.setDefault("enable_experimental", "false");
|
||||||
g_settings.setDefault("creative_mode", "false");
|
g_settings.setDefault("creative_mode", "false");
|
||||||
g_settings.setDefault("enable_damage", "true");
|
g_settings.setDefault("enable_damage", "true");
|
||||||
|
@ -46,6 +46,18 @@ InventoryItem::~InventoryItem()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
content_t content_translate_from_19_to_internal(content_t c_from)
|
||||||
|
{
|
||||||
|
for(u32 i=0; i<sizeof(trans_table_19)/sizeof(trans_table_19[0]); i++)
|
||||||
|
{
|
||||||
|
if(trans_table_19[i][1] == c_from)
|
||||||
|
{
|
||||||
|
return trans_table_19[i][0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return c_from;
|
||||||
|
}
|
||||||
|
|
||||||
InventoryItem* InventoryItem::deSerialize(std::istream &is)
|
InventoryItem* InventoryItem::deSerialize(std::istream &is)
|
||||||
{
|
{
|
||||||
DSTACK(__FUNCTION_NAME);
|
DSTACK(__FUNCTION_NAME);
|
||||||
@ -58,6 +70,21 @@ InventoryItem* InventoryItem::deSerialize(std::istream &is)
|
|||||||
if(name == "MaterialItem")
|
if(name == "MaterialItem")
|
||||||
{
|
{
|
||||||
// u16 reads directly as a number (u8 doesn't)
|
// u16 reads directly as a number (u8 doesn't)
|
||||||
|
u16 material;
|
||||||
|
is>>material;
|
||||||
|
u16 count;
|
||||||
|
is>>count;
|
||||||
|
// Convert old materials
|
||||||
|
if(material <= 0xff)
|
||||||
|
{
|
||||||
|
material = content_translate_from_19_to_internal(material);
|
||||||
|
}
|
||||||
|
if(material > MAX_CONTENT)
|
||||||
|
throw SerializationError("Too large material number");
|
||||||
|
return new MaterialItem(material, count);
|
||||||
|
}
|
||||||
|
else if(name == "MaterialItem2")
|
||||||
|
{
|
||||||
u16 material;
|
u16 material;
|
||||||
is>>material;
|
is>>material;
|
||||||
u16 count;
|
u16 count;
|
||||||
|
@ -136,7 +136,7 @@ public:
|
|||||||
virtual void serialize(std::ostream &os)
|
virtual void serialize(std::ostream &os)
|
||||||
{
|
{
|
||||||
//os.imbue(std::locale("C"));
|
//os.imbue(std::locale("C"));
|
||||||
os<<getName();
|
os<<"MaterialItem2";
|
||||||
os<<" ";
|
os<<" ";
|
||||||
os<<(unsigned int)m_content;
|
os<<(unsigned int)m_content;
|
||||||
os<<" ";
|
os<<" ";
|
||||||
|
@ -1579,6 +1579,8 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
password = translatePassword(playername, menudata.password);
|
password = translatePassword(playername, menudata.password);
|
||||||
|
|
||||||
|
//dstream<<"Main: password hash: '"<<password<<"'"<<std::endl;
|
||||||
|
|
||||||
address = wide_to_narrow(menudata.address);
|
address = wide_to_narrow(menudata.address);
|
||||||
int newport = stoi(wide_to_narrow(menudata.port));
|
int newport = stoi(wide_to_narrow(menudata.port));
|
||||||
if(newport != 0)
|
if(newport != 0)
|
||||||
|
@ -976,6 +976,40 @@ static void make_dungeon1(VoxelManipulator &vmanip, PseudoRandom &random)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void make_nc(VoxelManipulator &vmanip, PseudoRandom &random)
|
||||||
|
{
|
||||||
|
v3s16 dir;
|
||||||
|
u8 facedir_i = 0;
|
||||||
|
s32 r = random.range(0, 3);
|
||||||
|
if(r == 0){
|
||||||
|
dir = v3s16( 1, 0, 0);
|
||||||
|
facedir_i = 3;
|
||||||
|
}
|
||||||
|
if(r == 1){
|
||||||
|
dir = v3s16(-1, 0, 0);
|
||||||
|
facedir_i = 1;
|
||||||
|
}
|
||||||
|
if(r == 2){
|
||||||
|
dir = v3s16( 0, 0, 1);
|
||||||
|
facedir_i = 2;
|
||||||
|
}
|
||||||
|
if(r == 3){
|
||||||
|
dir = v3s16( 0, 0,-1);
|
||||||
|
facedir_i = 0;
|
||||||
|
}
|
||||||
|
v3s16 p = vmanip.m_area.MinEdge + v3s16(
|
||||||
|
16+random.range(0,15),
|
||||||
|
16+random.range(0,15),
|
||||||
|
16+random.range(0,15));
|
||||||
|
vmanip.m_data[vmanip.m_area.index(p)] = MapNode(CONTENT_NC, facedir_i);
|
||||||
|
u32 length = random.range(3,15);
|
||||||
|
for(u32 j=0; j<length; j++)
|
||||||
|
{
|
||||||
|
p -= dir;
|
||||||
|
vmanip.m_data[vmanip.m_area.index(p)] = MapNode(CONTENT_NC_RB);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Noise functions. Make sure seed is mangled differently in each one.
|
Noise functions. Make sure seed is mangled differently in each one.
|
||||||
*/
|
*/
|
||||||
@ -1872,6 +1906,17 @@ void make_block(BlockMakeData *data)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Add NC
|
||||||
|
*/
|
||||||
|
{
|
||||||
|
PseudoRandom ncrandom(blockseed+9324342);
|
||||||
|
if(ncrandom.range(0, 1000) == 0 && blockpos.Y <= -3)
|
||||||
|
{
|
||||||
|
make_nc(vmanip, ncrandom);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Add top and bottom side of water to transforming_liquid queue
|
Add top and bottom side of water to transforming_liquid queue
|
||||||
*/
|
*/
|
||||||
|
@ -150,7 +150,7 @@ void init_mapnode()
|
|||||||
continue;
|
continue;
|
||||||
ContentFeatures *f = &g_content_features[i];
|
ContentFeatures *f = &g_content_features[i];
|
||||||
f->setAllTextures("unknown_block.png");
|
f->setAllTextures("unknown_block.png");
|
||||||
f->dug_item = std::string("MaterialItem ")+itos(i)+" 1";
|
f->dug_item = std::string("MaterialItem2 ")+itos(i)+" 1";
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -391,6 +391,9 @@ inline v3s16 unpackDir(u8 b)
|
|||||||
facedir: CPT_FACEDIR_SIMPLE param1 value
|
facedir: CPT_FACEDIR_SIMPLE param1 value
|
||||||
dir: The face for which stuff is wanted
|
dir: The face for which stuff is wanted
|
||||||
return value: The face from which the stuff is actually found
|
return value: The face from which the stuff is actually found
|
||||||
|
|
||||||
|
NOTE: Currently this uses 2 bits for Z-,X-,Z+,X+, should there be Y+
|
||||||
|
and Y- too?
|
||||||
*/
|
*/
|
||||||
v3s16 facedir_rotate(u8 facedir, v3s16 dir);
|
v3s16 facedir_rotate(u8 facedir, v3s16 dir);
|
||||||
|
|
||||||
|
@ -29,6 +29,7 @@ Player::Player():
|
|||||||
in_water(false),
|
in_water(false),
|
||||||
in_water_stable(false),
|
in_water_stable(false),
|
||||||
swimming_up(false),
|
swimming_up(false),
|
||||||
|
inventory_backup(NULL),
|
||||||
craftresult_is_preview(true),
|
craftresult_is_preview(true),
|
||||||
hp(20),
|
hp(20),
|
||||||
peer_id(PEER_ID_INEXISTENT),
|
peer_id(PEER_ID_INEXISTENT),
|
||||||
@ -43,6 +44,7 @@ Player::Player():
|
|||||||
|
|
||||||
Player::~Player()
|
Player::~Player()
|
||||||
{
|
{
|
||||||
|
delete inventory_backup;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Player::resetInventory()
|
void Player::resetInventory()
|
||||||
@ -107,7 +109,12 @@ void Player::serialize(std::ostream &os)
|
|||||||
|
|
||||||
os<<"PlayerArgsEnd\n";
|
os<<"PlayerArgsEnd\n";
|
||||||
|
|
||||||
inventory.serialize(os);
|
// If actual inventory is backed up due to creative mode, save it
|
||||||
|
// instead of the dummy creative mode inventory
|
||||||
|
if(inventory_backup)
|
||||||
|
inventory_backup->serialize(os);
|
||||||
|
else
|
||||||
|
inventory.serialize(os);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Player::deSerialize(std::istream &is)
|
void Player::deSerialize(std::istream &is)
|
||||||
|
@ -121,6 +121,8 @@ public:
|
|||||||
bool swimming_up;
|
bool swimming_up;
|
||||||
|
|
||||||
Inventory inventory;
|
Inventory inventory;
|
||||||
|
// Actual inventory is backed up here when creative mode is used
|
||||||
|
Inventory *inventory_backup;
|
||||||
|
|
||||||
bool craftresult_is_preview;
|
bool craftresult_is_preview;
|
||||||
|
|
||||||
|
@ -1972,20 +1972,23 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Check network protocol version
|
Read and check network protocol version
|
||||||
*/
|
*/
|
||||||
|
|
||||||
u16 net_proto_version = 0;
|
u16 net_proto_version = 0;
|
||||||
if(datasize >= 2+1+PLAYERNAME_SIZE+PASSWORD_SIZE+2)
|
if(datasize >= 2+1+PLAYERNAME_SIZE+PASSWORD_SIZE+2)
|
||||||
{
|
{
|
||||||
net_proto_version = readU16(&data[2+1+PLAYERNAME_SIZE+PASSWORD_SIZE]);
|
net_proto_version = readU16(&data[2+1+PLAYERNAME_SIZE+PASSWORD_SIZE]);
|
||||||
}
|
}
|
||||||
|
|
||||||
getClient(peer->id)->net_proto_version = net_proto_version;
|
getClient(peer->id)->net_proto_version = net_proto_version;
|
||||||
/*if(net_proto_version == 0)
|
|
||||||
|
if(net_proto_version == 0)
|
||||||
{
|
{
|
||||||
SendAccessDenied(m_con, peer_id,
|
SendAccessDenied(m_con, peer_id,
|
||||||
L"Your client is too old (network protocol)");
|
L"Your client is too old. Please upgrade.");
|
||||||
return;
|
return;
|
||||||
}*/
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Set up player
|
Set up player
|
||||||
@ -2017,7 +2020,7 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
|
|||||||
|
|
||||||
// Get password
|
// Get password
|
||||||
char password[PASSWORD_SIZE];
|
char password[PASSWORD_SIZE];
|
||||||
if(datasize >= 2+1+PLAYERNAME_SIZE)
|
if(datasize < 2+1+PLAYERNAME_SIZE+PASSWORD_SIZE)
|
||||||
{
|
{
|
||||||
// old version - assume blank password
|
// old version - assume blank password
|
||||||
password[0] = 0;
|
password[0] = 0;
|
||||||
@ -2041,7 +2044,10 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
|
|||||||
checkpwd = g_settings.get("default_password");
|
checkpwd = g_settings.get("default_password");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(password != checkpwd && checkpwd != "")
|
/*dstream<<"Server: Client gave password '"<<password
|
||||||
|
<<"', the correct one is '"<<checkpwd<<"'"<<std::endl;*/
|
||||||
|
|
||||||
|
if(password != checkpwd && m_authmanager.exists(playername))
|
||||||
{
|
{
|
||||||
derr_server<<DTIME<<"Server: peer_id="<<peer_id
|
derr_server<<DTIME<<"Server: peer_id="<<peer_id
|
||||||
<<": supplied invalid password for "
|
<<": supplied invalid password for "
|
||||||
@ -2182,10 +2188,11 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
|
|||||||
BroadcastChatMessage(message);
|
BroadcastChatMessage(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(getClient(peer->id)->net_proto_version == 0)
|
// Warnings about protocol version can be issued here
|
||||||
|
/*if(getClient(peer->id)->net_proto_version == 0)
|
||||||
{
|
{
|
||||||
SendChatMessage(peer_id, L"# Server: NOTE: YOUR CLIENT IS OLD AND DOES NOT WORK PROPERLY WITH THIS SERVER");
|
SendChatMessage(peer_id, L"# Server: NOTE: YOUR CLIENT IS OLD AND DOES NOT WORK PROPERLY WITH THIS SERVER");
|
||||||
}
|
}*/
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -3346,6 +3353,9 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
|
|||||||
newpwd += c;
|
newpwd += c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dstream<<"Server: Client requests a password change from "
|
||||||
|
<<"'"<<oldpwd<<"' to '"<<newpwd<<"'"<<std::endl;
|
||||||
|
|
||||||
std::string playername = player->getName();
|
std::string playername = player->getName();
|
||||||
|
|
||||||
if(m_authmanager.exists(playername) == false)
|
if(m_authmanager.exists(playername) == false)
|
||||||
@ -4130,6 +4140,11 @@ Player *Server::emergePlayer(const char *name, const char *password, u16 peer_id
|
|||||||
// Reset inventory to creative if in creative mode
|
// Reset inventory to creative if in creative mode
|
||||||
if(g_settings.getBool("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);
|
craft_set_creative_inventory(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4183,6 +4198,11 @@ Player *Server::emergePlayer(const char *name, const char *password, u16 peer_id
|
|||||||
|
|
||||||
if(g_settings.getBool("creative_mode"))
|
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);
|
craft_set_creative_inventory(player);
|
||||||
}
|
}
|
||||||
else if(g_settings.getBool("give_initial_stuff"))
|
else if(g_settings.getBool("give_initial_stuff"))
|
||||||
|
6
src/winresource.rc
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#include <windows.h>
|
||||||
|
#include <commctrl.h>
|
||||||
|
#include <richedit.h>
|
||||||
|
LANGUAGE 0, SUBLANG_NEUTRAL
|
||||||
|
130 ICON "..\\minetest-icon.ico"
|
||||||
|
//131 BITMAP "..\\minetest-icon.bmp"
|