3987 Commits

Author SHA1 Message Date
Loic Blot
4b13b7a736 craftdef.cpp: Return 0 after assert to make Clang happy 2015-04-05 11:16:12 +02:00
Loic Blot
db8ca65b47 Fix uninitialized variabled in ConnectionEvent 2015-04-05 11:13:30 +02:00
est31
14ede81c60 Crafting speedup
This greatly increases crafting performance, especially in worlds with many mods.

Approved by @kwolekr.

Introduces a hash-type-layered fall-through mechanism, where every layer specifies one hash algorithm,
and the "deeper the fall", the more collisions to expect for the algorithm. One Craft definition
only resides at one layer, which improves speed for lower layers (and a complete fail), due to most
craft definitions residing at high layers.

Due to the fall-through design, the undocumented behaviour that later craft recipes
override older ones had to be weaked up a bit, but craft recipes with the same hash and layer
will still override.
2015-04-05 09:25:46 +02:00
est31
3a5c349b92 Remove errorstream logging on password change
This seems to be a debug message which has been forgotten to be removed.
2015-04-03 14:01:41 +02:00
Loic Blot
e19883f968 Fix players spawned at (0,0,0) in some rare cases instead of static_spawnpoint, if set
Approved by: @kwoelkr
2015-04-03 09:44:36 +02:00
Loic Blot
117d5e33eb Create PacketError exception and use it with ACTIVEOBJECT_REMOVE_ADD handler which can be unreliable 2015-04-03 08:53:31 +02:00
Aaron Suen
6e52ee086c Fix crash caused by null texture in GUI formspec/HUD. 2015-04-02 23:56:46 +10:00
SmallJoker
dbf9755f89 Fix MSVC error caused by ed10005 2015-04-02 22:56:36 +10:00
paramat
bc063f6791 Treegen: Add pine tree. Force place trunks
Speed-optimise leaves blits
Use MMVManip for make_jungletree
Use correct code style
2015-04-01 22:54:49 +01:00
Craig Robbins
0731f9ed2a Move globals from main.cpp to more sane locations
Move debug streams to log.cpp|h

Move GUI-related globals to clientlauncher

Move g_settings and g_settings_path to settings.cpp|h

Move g_menuclouds to clouds.cpp|h

Move g_profiler to profiler.cpp|h
2015-04-01 23:04:25 +10:00
Loic Blot
066ae642d2 NetworkPacket: reading outside packet is now clearer.
Use a common function to check the reading offset
2015-04-01 14:47:46 +02:00
kwolekr
86e79b3a50 Fix some minor details from 6d61375 2015-04-01 00:19:10 -04:00
Aaron Suen
e8d51554ae Clean scaling pre-filter for formspec/HUD. 2015-04-01 00:01:05 -04:00
kwolekr
2236ae8884 Fix usage of destroyed mutex
Also fix a memory leak
Fix overloaded virtual warning in Player::move()
Remove some trailing whitespace
2015-03-31 23:50:38 -04:00
kwolekr
1c1f67fdf0 Fix set_bits 2015-03-31 23:30:44 -04:00
kwolekr
87ea5c96a6 ObjDefManager, Mapgen SAPI: Huge refactoring
- General code cleanup
 - Unified object creation and loading
 - Specifying objects in APIs is now orthogonal (i.e. anything can take an ID,
   name string, or the raw table definition (and automatically registers if present
2015-03-31 23:27:58 -04:00
Craig Robbins
ac82476b86 Fix use of unitialized variable in gettext.cpp
#2583
2015-03-31 21:26:34 +10:00
Loic Blot
ffee8a059a Connection::Receive(): receive Network Packet instead of SharedBuffer<u8>.
Because we get a Buffer<u8> from ConnectionEvent, don't convert it to SharedBuffer<u8> and return it to Server/Client::Receive which will convert it to NetworkPacket
Instead, put the Buffer<u8> directly to NetworkPacket and return it to packet processing
This remove a long existing memory copy
Also check the packet size directly into Connection::Receive instead of packet processing
2015-03-31 11:01:08 +02:00
Loic Blot
b217a0d01d RunCommandQueues: little optimization
remove command from queue on success, else do nothing, instead of remove command from queue and push it front on success
2015-03-31 09:29:33 +02:00
Loic Blot
3eefe0f9a1 Typo in getOutgoingSequenceNumber => successfull to successful 2015-03-31 09:18:11 +02:00
Aaron Suen
b7263a190f Move texture_min_size even further down the pipe. Now, textures are JIT-upscaled using an image transformation, right at the time they're added to a mesh or particle; images used in 2D elements are left unscaled. This should fix any remaining issues with HUD elements. 2015-03-31 16:56:33 +10:00
Craig Robbins
fd71a03b85 Change format of screenshot names
Filename screenshot_ + ISO 8601 format + [-serial]

i.e. screenshot_YYYY-MM-DDTHH::MM::SS[-serial].png

Serial is added if the filename + timestamp already exists and is in the range 1 to 999
2015-03-31 16:24:25 +10:00
kwolekr
ae55a60e16 GenElementManager: Pass opaque handles to Lua and rename to ObjDefManager
Add core.clear_registered_schematics() and refactor schematics somewhat
2015-03-31 01:11:51 -04:00
Loic Blot
b17ebf58c0 Use Buffer not SharedBuffer in NetworkPacket::oldForgePacket 2015-03-30 19:55:14 +02:00
Craig Robbins
e1951e4d12 On Android enable always fast
Invert the meaning of holding down the fast button (i.e. holding down the fast button -- if there is one -- means walk), unless performing an action, sneaking or jumping.
Still requires fast move to be toggled on (and fast priv)
2015-03-30 00:40:12 +10:00
Craig Robbins
5e2bb20166 Fix Android build-related bugs
E.g. Sound and freetype always being disabled, redefinition of pre-processor directives
2015-03-29 22:27:01 +10:00
Craig Robbins
01a05377d4 Make sure g_timegetter is initalised before running speedtests
Thanks @SmallJoker for noticing the issue
2015-03-29 22:21:32 +10:00
Craig Robbins
00b9ca5e77 Fix typo 2015-03-29 22:08:14 +10:00
Loic Blot
e94a288067 queued_commands must be a std::deque. RunCommandQueues needs to push packet on front, not back 2015-03-29 10:49:43 +02:00
Loic Blot
dd68936a0c Fix uninitialized variable Player::local_animation_speed 2015-03-28 10:46:01 +01:00
Craig Robbins
918e2548d0 Add Lua function get_video_modes() for main menu
Also updates and uses porting::getSupportedVideoModes()
2015-03-28 13:26:03 +10:00
ShadowNinja
3e6bebd2b1 Make camera clear error message if there's no error 2015-03-27 22:20:10 -04:00
ShadowNinja
9f63a1e3eb Fix GetText translation loading 2015-03-27 22:10:08 -04:00
ShadowNinja
295d5f2a68 Change error_message from wstring to string
This removes a lot of narrow/wide conversions where a wide string was never used.
2015-03-27 20:24:04 -04:00
ShadowNinja
279c4211e6 Fix MSVC compile error 2015-03-27 15:16:41 -04:00
ShadowNinja
2de60ae349 Clean up and tweak build system
* Combine client and server man pages.
  * Update unit test options and available databases in man page.
  * Add `--worldname` to man page.
  * Fix a bunch of places where `"Minetest"` was used directly instead of `PROJECT_NAME`.
  * Disable server build by default on all operating systems.
  * Make `ENABLE_FREETYPE` not fail if FreeType isn't found.
  * Enable LevelDB, Redis, and FreeType detection by default.
  * Remove the `VERSION_PATCH_ORIG` hack.
  * Add option to search for and use system JSONCPP.
  * Remove broken LuaJIT version detection.
  * Rename `DISABLE_LUAJIT` to `ENABLE_LUAJIT`.
  * Rename `minetest_*` variables in `version.{h,cpp}` to `g_*`.
  * Clean up style of CMake files.
2015-03-27 15:00:48 -04:00
paramat
c4d375a253 lua_api/l_mapgen: generate_ores/decorations: make p1, p2 optional 2015-03-24 18:07:29 +00:00
Craig Robbins
0d4b186bbd Change filename of screenshots to something more human readable 2015-03-25 02:55:28 +10:00
Craig Robbins
b1e8a816d5 Update timestamp to include date 2015-03-25 02:30:17 +10:00
Loic Blot
6450ca41ec Don't send an InventoryAction at each setInventoryModified, we only need one SendInventory per inventory modification
Client doesn't like to receive multiples SendInventory for one action, this can trigger glitches on clients (sometimes due to incorrect UDP packet ordering due to UDP protocol)

This fix issue #2544
2015-03-24 14:13:17 +01:00
Craig Robbins
0d5696e73d Slow down the "key repeat" touch speed for some Android controls
Increases the key/buttons repeat delay for fly, noclip, fast, debug and camera buttons
2015-03-24 22:19:32 +10:00
kwolekr
4174dde376 Add core.register_schematic() and cache schematics on use 2015-03-23 22:23:38 -04:00
kwolekr
44f8d53b77 Fix endianness inconsistency with PcgRandom::bytes() 2015-03-23 22:23:16 -04:00
kwolekr
2d4629c01d Schematics: Error if unable to open file 2015-03-23 22:22:14 -04:00
kwolekr
714d28bd88 Do not enable texture_clean_transparent by default
This feature is still experimental and has some issues. Also,
increase texture_min_size to 64 px. The setting was initially
a conservative 16 so that the effect would not be noticable
for players who aren't using aniso/bi/trilinear filtering. This
isn't necessary now that texture_clean_transparent is disabled
by default.
2015-03-23 18:25:14 -04:00
paramat
3125b03465 Mgv6: Use heightmap in placeTreesAndJungleGrass() 2015-03-23 21:55:01 +00:00
Aaron Suen
6ec44bfd57 Fix for sun/moon tonemaps: don't upscale 1px images. 2015-03-23 17:01:37 +10:00
est31
e431f47da1 Fix minetest.get_craft_recipe function
Previously, calling it resulted in a crash.
2015-03-23 13:40:20 +10:00
Loic Blot
c03ec90c9a Player: Fix a deadlock triggered by previous commit 0e5e49736c0a5fa29bca257bafc02d7c7a7171c9 2015-03-22 21:33:09 +01:00
Loic Blot
f0cbf06e63 Protect Player::hud from concurrent modifications
Sometimes HUD can be modified by ServerThread and EmergeThread results in a crash on client side because the HUD is not correct
2015-03-22 20:47:07 +01:00