Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
minetest-services committed May 13, 2013
2 parents be96fa2 + 822723c commit e0564d5
Show file tree
Hide file tree
Showing 37 changed files with 1,133 additions and 469 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Expand Up @@ -143,6 +143,7 @@ if(EXISTS ${MINETEST_GAME_SOURCE} AND IS_DIRECTORY ${MINETEST_GAME_SOURCE})
install(FILES ${MINETEST_GAME_SOURCE}/game.conf DESTINATION "${SHAREDIR}/games/minetest_game/")
install(FILES ${MINETEST_GAME_SOURCE}/README.txt DESTINATION "${SHAREDIR}/games/minetest_game/")
install(DIRECTORY ${MINETEST_GAME_SOURCE}/mods DESTINATION "${SHAREDIR}/games/minetest_game")
install(DIRECTORY ${MINETEST_GAME_SOURCE}/menu DESTINATION "${SHAREDIR}/games/minetest_game")
endif()
set(MINETEST_BUILD_GAME_SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/games/build")
if(EXISTS ${MINETEST_BUILD_GAME_SOURCE} AND IS_DIRECTORY ${MINETEST_BUILD_GAME_SOURCE})
Expand Down
20 changes: 12 additions & 8 deletions README.txt
Expand Up @@ -30,13 +30,17 @@ This game is not finished

Default Controls
-----------------
- WASD: Move
- Space: Jump
- E: Go down
- Shift: Sneak
- Q: Drop item
- I: Open inventory
- Mouse: Turn/look
- WASD: move
- Space: jump/climb
- Shift: sneak/go down
- Q: drop item
- I: inventory
- Mouse: turn/look
- Mouse left: dig/punch
- Mouse right: place/use
- Mouse wheel: select item
- Esc: pause menu
- T: chat
- Settable in the configuration file, see the section below.

Paths
Expand Down Expand Up @@ -277,7 +281,7 @@ the Free Software Foundation; either version 2.1 of the License, or
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
Expand Down
10 changes: 5 additions & 5 deletions builtin/features.lua
@@ -1,11 +1,11 @@
-- Minetest: builtin/features.lua

minetest.features = {
"glasslike_framed" = true,
"nodebox_as_selectionbox" = true,
"chat_send_player_param3" = true,
"get_all_craft_recipes_works" = true,
"use_texture_alpha" = true,
glasslike_framed = true,
nodebox_as_selectionbox = true,
chat_send_player_param3 = true,
get_all_craft_recipes_works = true,
use_texture_alpha = true,
}

function minetest.has_feature(arg)
Expand Down
11 changes: 11 additions & 0 deletions doc/lua_api.txt
Expand Up @@ -120,6 +120,17 @@ depends.txt:
List of mods that have to be loaded before loading this mod.
A single line contains a single modname.

Optional dependencies can be defined by appending a question mark
to a single modname. Their meaning is that if the specified mod
is missing, that does not prevent this mod from being loaded.

optdepends.txt:
An alternative way of specifying optional dependencies.
Like depends.txt, a single line contains a single modname.

NOTE: This file exists for compatibility purposes only and
support for it will be removed from the engine by the end of 2013.

init.lua:
The main Lua script. Running this script should register everything it
wants to register. Subsequent execution depends on minetest calling the
Expand Down
3 changes: 3 additions & 0 deletions doc/minetest.6
Expand Up @@ -61,6 +61,9 @@ Run dedicated server
\-\-speedtests
Run speed tests
.TP
\-\-videomodes
List available video modes
.TP
\-\-info
Print more information to console
.TP
Expand Down
Binary file added games/minimal/menu/background.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added games/minimal/menu/icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions minetest.conf.example
Expand Up @@ -151,6 +151,8 @@
#crosshair_color = (255,255,255)
# Cross alpha (opaqueness, between 0 and 255)
#crosshair_alpha = 255
# Sensitivity multiplier
#mouse_sensitivity = 0.2
# Sound settings
#enable_sound = true
#sound_volume = 0.7
Expand Down
19 changes: 18 additions & 1 deletion src/client.cpp
Expand Up @@ -29,6 +29,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "mapblock.h"
#include "settings.h"
#include "profiler.h"
#include "gettext.h"
#include "log.h"
#include "nodemetadata.h"
#include "nodedef.h"
Expand Down Expand Up @@ -2555,6 +2556,9 @@ void Client::inventoryAction(InventoryAction *a)
Predict some local inventory changes
*/
a->clientApply(this, this);

// Remove it
delete a;
}

ClientActiveObject * Client::getSelectedActiveObject(
Expand Down Expand Up @@ -2801,7 +2805,10 @@ ClientEvent Client::getClientEvent()
return m_client_event_queue.pop_front();
}

void Client::afterContentReceived()
void draw_load_screen(const std::wstring &text,
IrrlichtDevice* device, gui::IGUIFont* font,
float dtime=0 ,int percent=0, bool clouds=true);
void Client::afterContentReceived(IrrlichtDevice *device, gui::IGUIFont* font)
{
infostream<<"Client::afterContentReceived() started"<<std::endl;
assert(m_itemdef_received);
Expand Down Expand Up @@ -2836,13 +2843,23 @@ void Client::afterContentReceived()
if(g_settings->getBool("preload_item_visuals"))
{
verbosestream<<"Updating item textures and meshes"<<std::endl;
wchar_t* text = wgettext("Item textures...");
draw_load_screen(text,device,font,0,0);
std::set<std::string> names = m_itemdef->getAll();
size_t size = names.size();
size_t count = 0;
int percent = 0;
for(std::set<std::string>::const_iterator
i = names.begin(); i != names.end(); ++i){
// Asking for these caches the result
m_itemdef->getInventoryTexture(*i, this);
m_itemdef->getWieldMesh(*i, this);
count++;
percent = count*100/size;
if (count%50 == 0) // only update every 50 item
draw_load_screen(text,device,font,0,percent);
}
delete[] text;
}

// Start mesh update thread after setting up content definitions
Expand Down
2 changes: 1 addition & 1 deletion src/client.h
Expand Up @@ -385,7 +385,7 @@ class Client : public con::PeerHandler, public InventoryManager, public IGameDef
bool nodedefReceived()
{ return m_nodedef_received; }

void afterContentReceived();
void afterContentReceived(IrrlichtDevice *device, gui::IGUIFont* font);

float getRTT(void);

Expand Down
8 changes: 4 additions & 4 deletions src/clientserver.h
Expand Up @@ -91,10 +91,10 @@ SharedBuffer<u8> makePacket_TOCLIENT_TIME_OF_DAY(u16 time, float time_speed);
PROTOCOL_VERSION 19:
GENERIC_CMD_SET_PHYSICS_OVERRIDE
PROTOCOL_VERSION 20:
TOCLIENT_HUD_ADD
TOCLIENT_HUD_RM
TOCLIENT_HUD_CHANGE
TOCLIENT_HUD_BUILTIN_ENABLE
TOCLIENT_HUDADD
TOCLIENT_HUDRM
TOCLIENT_HUDCHANGE
TOCLIENT_HUD_SET_FLAGS
*/

#define LATEST_PROTOCOL_VERSION 20
Expand Down
1 change: 1 addition & 0 deletions src/defaultsettings.cpp
Expand Up @@ -117,6 +117,7 @@ void set_default_settings(Settings *settings)
settings->setDefault("selectionbox_color", "(0,0,0)");
settings->setDefault("crosshair_color", "(255,255,255)");
settings->setDefault("crosshair_alpha", "255");
settings->setDefault("mouse_sensitivity", "0.2");
settings->setDefault("enable_sound", "true");
settings->setDefault("sound_volume", "0.8");
settings->setDefault("desynchronize_mapblock_texture_animation", "true");
Expand Down
17 changes: 8 additions & 9 deletions src/environment.cpp
Expand Up @@ -1084,8 +1084,8 @@ void ServerEnvironment::step(float dtime)
{
v3s16 p = *i;

/*infostream<<"Server: Block ("<<p.X<<","<<p.Y<<","<<p.Z
<<") became inactive"<<std::endl;*/
/* infostream<<"Server: Block " << PP(p)
<< " became inactive"<<std::endl; */

MapBlock *block = m_map->getBlockNoCreateNoEx(p);
if(block==NULL)
Expand All @@ -1104,9 +1104,6 @@ void ServerEnvironment::step(float dtime)
i != blocks_added.end(); ++i)
{
v3s16 p = *i;

/*infostream<<"Server: Block ("<<p.X<<","<<p.Y<<","<<p.Z
<<") became active"<<std::endl;*/

MapBlock *block = m_map->getBlockNoCreateNoEx(p);
if(block==NULL){
Expand All @@ -1117,6 +1114,8 @@ void ServerEnvironment::step(float dtime)
}

activateBlock(block);
/* infostream<<"Server: Block " << PP(p)
<< " became active"<<std::endl; */
}
}

Expand Down Expand Up @@ -1850,17 +1849,17 @@ void ServerEnvironment::deactivateFarObjects(bool force_delete)
<<" Forcing delete."<<std::endl;
force_delete = true;
} else {
u16 new_id = pending_delete ? id : 0;
// If static counterpart already exists, remove it first.
// This shouldn't happen, but happens rarely for some
// unknown reason. Unsuccessful attempts have been made to
// find said reason.
if(new_id && block->m_static_objects.m_active.find(new_id) != block->m_static_objects.m_active.end()){
if(id && block->m_static_objects.m_active.find(id) != block->m_static_objects.m_active.end()){
infostream<<"ServerEnv: WARNING: Performing hack #83274"
<<std::endl;
block->m_static_objects.remove(new_id);
block->m_static_objects.remove(id);
}
block->m_static_objects.insert(new_id, s_obj);
//store static data
block->m_static_objects.insert(0, s_obj);

// Only mark block as modified if data changed considerably
if(shall_be_written)
Expand Down

0 comments on commit e0564d5

Please sign in to comment.