Skip to content

Commit e0564d5

Browse files
committedMay 13, 2013
Merge remote-tracking branch 'origin/master'
2 parents be96fa2 + 822723c commit e0564d5

37 files changed

+1133
-469
lines changed
 

‎CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ if(EXISTS ${MINETEST_GAME_SOURCE} AND IS_DIRECTORY ${MINETEST_GAME_SOURCE})
143143
install(FILES ${MINETEST_GAME_SOURCE}/game.conf DESTINATION "${SHAREDIR}/games/minetest_game/")
144144
install(FILES ${MINETEST_GAME_SOURCE}/README.txt DESTINATION "${SHAREDIR}/games/minetest_game/")
145145
install(DIRECTORY ${MINETEST_GAME_SOURCE}/mods DESTINATION "${SHAREDIR}/games/minetest_game")
146+
install(DIRECTORY ${MINETEST_GAME_SOURCE}/menu DESTINATION "${SHAREDIR}/games/minetest_game")
146147
endif()
147148
set(MINETEST_BUILD_GAME_SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/games/build")
148149
if(EXISTS ${MINETEST_BUILD_GAME_SOURCE} AND IS_DIRECTORY ${MINETEST_BUILD_GAME_SOURCE})

‎README.txt

+12-8
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,17 @@ This game is not finished
3030

3131
Default Controls
3232
-----------------
33-
- WASD: Move
34-
- Space: Jump
35-
- E: Go down
36-
- Shift: Sneak
37-
- Q: Drop item
38-
- I: Open inventory
39-
- Mouse: Turn/look
33+
- WASD: move
34+
- Space: jump/climb
35+
- Shift: sneak/go down
36+
- Q: drop item
37+
- I: inventory
38+
- Mouse: turn/look
39+
- Mouse left: dig/punch
40+
- Mouse right: place/use
41+
- Mouse wheel: select item
42+
- Esc: pause menu
43+
- T: chat
4044
- Settable in the configuration file, see the section below.
4145

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

282286
You should have received a copy of the GNU Lesser General Public License along
283287
with this program; if not, write to the Free Software Foundation, Inc.,

‎builtin/features.lua

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
-- Minetest: builtin/features.lua
22

33
minetest.features = {
4-
"glasslike_framed" = true,
5-
"nodebox_as_selectionbox" = true,
6-
"chat_send_player_param3" = true,
7-
"get_all_craft_recipes_works" = true,
8-
"use_texture_alpha" = true,
4+
glasslike_framed = true,
5+
nodebox_as_selectionbox = true,
6+
chat_send_player_param3 = true,
7+
get_all_craft_recipes_works = true,
8+
use_texture_alpha = true,
99
}
1010

1111
function minetest.has_feature(arg)

‎doc/lua_api.txt

+11
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,17 @@ depends.txt:
120120
List of mods that have to be loaded before loading this mod.
121121
A single line contains a single modname.
122122

123+
Optional dependencies can be defined by appending a question mark
124+
to a single modname. Their meaning is that if the specified mod
125+
is missing, that does not prevent this mod from being loaded.
126+
127+
optdepends.txt:
128+
An alternative way of specifying optional dependencies.
129+
Like depends.txt, a single line contains a single modname.
130+
131+
NOTE: This file exists for compatibility purposes only and
132+
support for it will be removed from the engine by the end of 2013.
133+
123134
init.lua:
124135
The main Lua script. Running this script should register everything it
125136
wants to register. Subsequent execution depends on minetest calling the

‎doc/minetest.6

+3
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ Run dedicated server
6161
\-\-speedtests
6262
Run speed tests
6363
.TP
64+
\-\-videomodes
65+
List available video modes
66+
.TP
6467
\-\-info
6568
Print more information to console
6669
.TP

‎games/minimal/menu/background.png

1.35 KB
Loading

‎games/minimal/menu/icon.png

397 Bytes
Loading

‎minetest.conf.example

+2
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@
151151
#crosshair_color = (255,255,255)
152152
# Cross alpha (opaqueness, between 0 and 255)
153153
#crosshair_alpha = 255
154+
# Sensitivity multiplier
155+
#mouse_sensitivity = 0.2
154156
# Sound settings
155157
#enable_sound = true
156158
#sound_volume = 0.7

‎src/client.cpp

+18-1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
2929
#include "mapblock.h"
3030
#include "settings.h"
3131
#include "profiler.h"
32+
#include "gettext.h"
3233
#include "log.h"
3334
#include "nodemetadata.h"
3435
#include "nodedef.h"
@@ -2555,6 +2556,9 @@ void Client::inventoryAction(InventoryAction *a)
25552556
Predict some local inventory changes
25562557
*/
25572558
a->clientApply(this, this);
2559+
2560+
// Remove it
2561+
delete a;
25582562
}
25592563

25602564
ClientActiveObject * Client::getSelectedActiveObject(
@@ -2801,7 +2805,10 @@ ClientEvent Client::getClientEvent()
28012805
return m_client_event_queue.pop_front();
28022806
}
28032807

2804-
void Client::afterContentReceived()
2808+
void draw_load_screen(const std::wstring &text,
2809+
IrrlichtDevice* device, gui::IGUIFont* font,
2810+
float dtime=0 ,int percent=0, bool clouds=true);
2811+
void Client::afterContentReceived(IrrlichtDevice *device, gui::IGUIFont* font)
28052812
{
28062813
infostream<<"Client::afterContentReceived() started"<<std::endl;
28072814
assert(m_itemdef_received);
@@ -2836,13 +2843,23 @@ void Client::afterContentReceived()
28362843
if(g_settings->getBool("preload_item_visuals"))
28372844
{
28382845
verbosestream<<"Updating item textures and meshes"<<std::endl;
2846+
wchar_t* text = wgettext("Item textures...");
2847+
draw_load_screen(text,device,font,0,0);
28392848
std::set<std::string> names = m_itemdef->getAll();
2849+
size_t size = names.size();
2850+
size_t count = 0;
2851+
int percent = 0;
28402852
for(std::set<std::string>::const_iterator
28412853
i = names.begin(); i != names.end(); ++i){
28422854
// Asking for these caches the result
28432855
m_itemdef->getInventoryTexture(*i, this);
28442856
m_itemdef->getWieldMesh(*i, this);
2857+
count++;
2858+
percent = count*100/size;
2859+
if (count%50 == 0) // only update every 50 item
2860+
draw_load_screen(text,device,font,0,percent);
28452861
}
2862+
delete[] text;
28462863
}
28472864

28482865
// Start mesh update thread after setting up content definitions

‎src/client.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ class Client : public con::PeerHandler, public InventoryManager, public IGameDef
385385
bool nodedefReceived()
386386
{ return m_nodedef_received; }
387387

388-
void afterContentReceived();
388+
void afterContentReceived(IrrlichtDevice *device, gui::IGUIFont* font);
389389

390390
float getRTT(void);
391391

‎src/clientserver.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,10 @@ SharedBuffer<u8> makePacket_TOCLIENT_TIME_OF_DAY(u16 time, float time_speed);
9191
PROTOCOL_VERSION 19:
9292
GENERIC_CMD_SET_PHYSICS_OVERRIDE
9393
PROTOCOL_VERSION 20:
94-
TOCLIENT_HUD_ADD
95-
TOCLIENT_HUD_RM
96-
TOCLIENT_HUD_CHANGE
97-
TOCLIENT_HUD_BUILTIN_ENABLE
94+
TOCLIENT_HUDADD
95+
TOCLIENT_HUDRM
96+
TOCLIENT_HUDCHANGE
97+
TOCLIENT_HUD_SET_FLAGS
9898
*/
9999

100100
#define LATEST_PROTOCOL_VERSION 20

‎src/defaultsettings.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ void set_default_settings(Settings *settings)
117117
settings->setDefault("selectionbox_color", "(0,0,0)");
118118
settings->setDefault("crosshair_color", "(255,255,255)");
119119
settings->setDefault("crosshair_alpha", "255");
120+
settings->setDefault("mouse_sensitivity", "0.2");
120121
settings->setDefault("enable_sound", "true");
121122
settings->setDefault("sound_volume", "0.8");
122123
settings->setDefault("desynchronize_mapblock_texture_animation", "true");

‎src/environment.cpp

+8-9
Original file line numberDiff line numberDiff line change
@@ -1084,8 +1084,8 @@ void ServerEnvironment::step(float dtime)
10841084
{
10851085
v3s16 p = *i;
10861086

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

10901090
MapBlock *block = m_map->getBlockNoCreateNoEx(p);
10911091
if(block==NULL)
@@ -1104,9 +1104,6 @@ void ServerEnvironment::step(float dtime)
11041104
i != blocks_added.end(); ++i)
11051105
{
11061106
v3s16 p = *i;
1107-
1108-
/*infostream<<"Server: Block ("<<p.X<<","<<p.Y<<","<<p.Z
1109-
<<") became active"<<std::endl;*/
11101107

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

11191116
activateBlock(block);
1117+
/* infostream<<"Server: Block " << PP(p)
1118+
<< " became active"<<std::endl; */
11201119
}
11211120
}
11221121

@@ -1850,17 +1849,17 @@ void ServerEnvironment::deactivateFarObjects(bool force_delete)
18501849
<<" Forcing delete."<<std::endl;
18511850
force_delete = true;
18521851
} else {
1853-
u16 new_id = pending_delete ? id : 0;
18541852
// If static counterpart already exists, remove it first.
18551853
// This shouldn't happen, but happens rarely for some
18561854
// unknown reason. Unsuccessful attempts have been made to
18571855
// find said reason.
1858-
if(new_id && block->m_static_objects.m_active.find(new_id) != block->m_static_objects.m_active.end()){
1856+
if(id && block->m_static_objects.m_active.find(id) != block->m_static_objects.m_active.end()){
18591857
infostream<<"ServerEnv: WARNING: Performing hack #83274"
18601858
<<std::endl;
1861-
block->m_static_objects.remove(new_id);
1859+
block->m_static_objects.remove(id);
18621860
}
1863-
block->m_static_objects.insert(new_id, s_obj);
1861+
//store static data
1862+
block->m_static_objects.insert(0, s_obj);
18641863

18651864
// Only mark block as modified if data changed considerably
18661865
if(shall_be_written)

0 commit comments

Comments
 (0)
Please sign in to comment.