Commit Graph

3368 Commits

Author SHA1 Message Date
Loic Blot
7c121726dc Typo in getOutgoingSequenceNumber => successfull to successful 2015-03-31 09:18:11 +02:00
Aaron Suen
db32e6c5aa 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
862d4ea328 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
ed10005d38 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
6a48844eba Use Buffer not SharedBuffer in NetworkPacket::oldForgePacket 2015-03-30 19:55:14 +02:00
Craig Robbins
ff924ef0dc 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
5ee0d8ac81 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
e1475bdc89 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
34101015b2 Fix typo 2015-03-29 22:08:14 +10:00
Loic Blot
dfe00abc5a 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
3444dec2db Fix uninitialized variable Player::local_animation_speed 2015-03-28 10:46:01 +01:00
Craig Robbins
2430b2e998 Add Lua function get_video_modes() for main menu
Also updates and uses porting::getSupportedVideoModes()
2015-03-28 13:26:03 +10:00
ShadowNinja
3ef0b4e637 Make camera clear error message if there's no error 2015-03-27 22:20:10 -04:00
ShadowNinja
5659434d32 Fix GetText translation loading 2015-03-27 22:10:08 -04:00
ShadowNinja
30075467b8 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
3d53c90d4b Fix MSVC compile error 2015-03-27 15:16:41 -04:00
ShadowNinja
93fcab952b 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
d1681872bf lua_api/l_mapgen: generate_ores/decorations: make p1, p2 optional 2015-03-24 18:07:29 +00:00
Craig Robbins
4fbcfac6cf Change filename of screenshots to something more human readable 2015-03-25 02:55:28 +10:00
Craig Robbins
2641fcc4bb Update timestamp to include date 2015-03-25 02:30:17 +10:00
Loic Blot
7851c4f7a2 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
9fbc3a8ca3 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
732d7b9a7c Add core.register_schematic() and cache schematics on use 2015-03-23 22:23:38 -04:00
kwolekr
9fc2b93d9f Fix endianness inconsistency with PcgRandom::bytes() 2015-03-23 22:23:16 -04:00
kwolekr
a423202756 Schematics: Error if unable to open file 2015-03-23 22:22:14 -04:00
kwolekr
11372ac646 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
37a6297025 Mgv6: Use heightmap in placeTreesAndJungleGrass() 2015-03-23 21:55:01 +00:00
Aaron Suen
6cf7c89236 Fix for sun/moon tonemaps: don't upscale 1px images. 2015-03-23 17:01:37 +10:00
est31
5b5c498011 Fix minetest.get_craft_recipe function
Previously, calling it resulted in a crash.
2015-03-23 13:40:20 +10:00
Loic Blot
0ae75f2a4e Player: Fix a deadlock triggered by previous commit 0e5e49736c0a5fa29bca257bafc02d7c7a7171c9 2015-03-22 21:33:09 +01:00
Loic Blot
0e5e49736c 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
paramat
d6638b4300 Mgv7: 1 up , 1 down overgeneration for chunk border continuity
Fixes biome layer at y = 47 when base/alt terrain exceeds it
Also fixes missing dust glitch at y = 47
Mgv5/mgv7:Cleanup code
2015-03-22 19:30:08 +00:00
Loic Blot
008d7e0467 Revert "Add a Lua call to do damages / heals" ok @ShadowNinja
This reverts commit 467fc0ddc912ae38c3bf9fcb99e0b66d7478eec0.
2015-03-22 18:01:56 +01:00
Loic Blot
61f2d0ca34 Remove unused ConnectionCommand::sendToAll function. NetworkPacket::oldForgePacket returns Buffer instead of SharedBuffer and is used in ConnectionCommand instead of Connection::Send
This remove the NetworkPacket buffer => SharedBuffer => Buffer copy. Now NetworkPacket => Buffer
2015-03-22 12:18:16 +01:00
kwolekr
761b127060 Fix some loose ends from 3993093f 2015-03-22 02:58:54 -04:00
kwolekr
3993093f51 Add support for the PCG32 PRNG algo (and associated script APIs) 2015-03-22 00:48:08 -04:00
poet-nohit
7679396ebb SendInventory when handleCommand_Interact is a use.
This call was missing when change looping to triggering SendInventory: 1b2f64473ed4f222d3b7f02df853730d4382105e
2015-03-21 21:37:32 +01:00
Aaron Suen
837a2e1e5f Fix composite textures with texture_min_size. Moved upscaling of textures to later in the process, when images are converted to textures, instead of right after image load, so the original image is unmodified for generateImagePart. 2015-03-22 01:31:01 +10:00
SmallJoker
709f4a50f7 Connect rails with connect_to_raillike and shorten the codes 2015-03-21 22:59:27 +10:00
gregorycu
03e0dd33a8 Optimize minetest.get_(all)_craft_recipe(s)
Signed off by: ShadowNinja, kwolekr
2015-03-20 21:41:18 -04:00
Aaron Suen
1e4fb80d46 Configurable automatic texture scaling and filtering at load time.
Signed off by: Zeno, kwolekr
2015-03-20 20:21:42 -04:00
kwolekr
26153bab7d Revert "Fix issue #2441: crash on respawn, since a conversion std::list to std::vector on Environment.cpp"
This reverts parts of commit 9749d9fee6db99da1ab861dc04ec63ef973db3e0, which breaks node resolver
list clearing
2015-03-20 18:41:26 -04:00
paramat
d03c2999da Mgv5/mgv7: Sprinkle dust from full_node_max.Y if chunk above is generated
Mgv5: Add large_cave_depth constant
2015-03-19 10:18:42 +00:00
Loic Blot
2676d289d9 Reset the old HP method on PlayerSAO::setHP 2015-03-19 07:47:45 +01:00
est31
538036d004 Fix game minetest.conf default settings
This was a regression introduced by f6e4c5d9cf459e8278a76a2beaee59732e841458 .
2015-03-18 13:03:02 -04:00
Loic Blot
467fc0ddc9 Add a Lua call to do damages / heals 2015-03-18 14:52:35 +01:00
Loic Blot
8f2e9bfbc2 ServerpacketHandler: spelling fixes 2015-03-18 12:06:02 +01:00
paramat
22730bbc0c Mgv6: Remove addDirtGravelBlobs, replaced by blob ore in Minetest Game
Desert stone above y = -32 not water_level
Remove unused generateExperimental()
2015-03-18 10:55:58 +00:00
fz72
8ca08a850f Save creative_mode and enable_damage setting for each world in world.mt
Create Parameters on world initialisation and set settings of old worlds
2015-03-18 09:53:24 +01:00
Loic Blot
2f0107f4a7 MutexedQueue inherits must use std::deque instead of std::list 2015-03-17 17:12:20 +01:00
Pavel Puchkin
ca5df44edb Standalone bundle for OSX (w/ dependencies!) 2015-03-17 15:37:23 +01:00
Loic Blot
7685969274 Server::step throw is never catched in minetestserver
Replace it with an errorstream + assert for server

This throw can be trigger by LuaError exception or ConnectionBindFailed exception in the following functions:
* EmergeThread::Thread()
* ScriptApiEnv::environment_Step()
* ScriptApiEnv::player_event()
* ServerThread::Thread()
2015-03-17 15:26:20 +01:00
Loic Blot
814e55597d Use the NetworkPacket api to read full version string instead of u8 pointers. Also store the reserved byte to use API properly
Fixes #2509
2015-03-17 14:12:18 +01:00
Loic Blot
bfc4652c66 Fix a little regression on SendActiveObjectMessages which send all TOCLIENT_ACTIVE_OBJECT_MESSAGES as reliable 2015-03-17 09:16:39 +01:00
Craig Robbins
dbe5a446c3 Minor bug fix (lag between damage flash and hearts updating) 2015-03-17 17:39:59 +10:00
Craig Robbins
c552d293fa Fix various damage related bugs (client-side)
E.g. spawning or teleporting into lava to become invinsible
2015-03-17 17:08:00 +10:00
Craig Robbins
34c5a5b377 Minor cleanup: game.cpp
* Sort includes
* Remove unnecessary includes
* Ensure the parameter name for GameRunData is consistent for class member functions
2015-03-17 17:07:39 +10:00
kwolekr
699d42efc6 Revert "Server::step throw is never catched. Replace it with an errorstream + assert"
This reverts commit 5f8e48c63baf12930430d5d8fc07495021599e61.
2015-03-16 21:17:27 -04:00
Loic Blot
5f8e48c63b Server::step throw is never catched. Replace it with an errorstream + assert
This throw can be trigger by LuaError exception or ConnectionBindFailed exception in the following functions:
* EmergeThread::Thread()
* ScriptApiEnv::environment_Step()
* ScriptApiEnv::player_event()
* ServerThread::Thread()
2015-03-16 20:25:35 +01:00
Loic Blot
d63df4ecb1 Move client packet generators to dedicated functions for:
* TOSERVER_INIT_LEGACY
* TOSERVER_DELETEDBLOCKS
* TOSERVER_GOTBLOCKS
* TOSERVER_REMOVED_SOUNDS
Also use a std::vector instead of std::set for TOSERVER_REMOVED_SOUNDS
2015-03-16 12:39:27 +01:00
Loic Blot
e7736ffdd6 Move TOCLIENT_ACTIVE_OBJECT_REMOVE_ADD and TOCLIENT_ACTIVE_OBJECT_MESSAGES to private functions 2015-03-16 12:01:40 +01:00
Loic Blot
b560294050 Rename packethandler/{client,server}.cpp to {client,server}packethandler.cpp
* Requested by @Zeno-
* Approved by @nerzhul
2015-03-16 10:19:19 +01:00
Loic Blot
aaf26b3a44 If player is dead, permit it to respawn, even if damages are not enabled
* Mods can do setHP function to do damages and override the enable_damage value sometimes
2015-03-16 10:02:01 +01:00
Loic Blot
b2801d8127 SendPlayerHPOrDie everytime at client connection, damage enabled or not, this will fix the player which stay dead at connection 2015-03-15 19:09:26 +01:00
est31
e4f7c92cff Finer progress bar updates when initializing nodes
The bar is only drawn when the user will notice a change, which prevents time overheads that this commit would cause, resulting from useless draws.
2015-03-15 22:01:52 +10:00
paramat
89217faec5 mg_decoration: Raise highest allowed deco top to max edge of voxelmanip
Remove max_y from functions, simplify code
2015-03-15 04:15:48 +00:00
Loic Blot
155116852a Android: Backport changes from stable-0.4 2015-03-14 19:59:14 +01:00
Craig Robbins
de6d5ce2cd Disable double-click -> ESC translation for main menu 2015-03-14 23:41:42 +10:00
Loic Blot
0e93eefb8f client.cpp: typo fix and break; fix to make some compilers happy 2015-03-13 22:08:48 +01:00
Loic Blot
083c8c734e Replace NetworkPacket pointers to references 2015-03-13 22:01:49 +01:00
Loic Blot
74d34da6cb Prepare Protocol v25 init & authentication.
* TOSERVER_INIT and TOCLIENT_INIT renamed to _LEGACY
* TOSERVER_PASSWORD merged from dev-0.5, can use protocol v24 and v25
* TOCLIENT_ACCESS_DENIED merged from dev-0.5, can use protocol v24 and v25, with normalized strings an a custom id for custom errors
* new TOSERVER_INIT packet only send MT version, supported compressions, protocols and serialization, this permit to rework everything later without break the _INIT packet
* new TOSERVER_AUTH packet which auth the client
* new TOCLIENT_HELLO packet which send server serialization version atm
* new TOCLIENT_AUTH_ACCEPTED which is send when TOCLIENT_AUTH was okay. After this packet, the client load datas from servers, like after TOCLIENT_INIT_LEGACY packet
2015-03-13 20:23:03 +01:00
Loic Blot
9f3fc7201b Handle the newly added TOCLIENT_ACCESS_DENIED and TOCLIENT_DELETE_PARTICLESPAWNER
* Rename the handlers from _Legacy to regular, because here we can use same handlers
* Fix some packet names and pseudo handlers
2015-03-13 14:28:20 +01:00
Loic Blot
126f36c2e6 Rename some packet and handlers to <packet>_Legacy name for compat layer between new network changes and old network clients 2015-03-13 13:40:48 +01:00
Loic Blot
4e63c977c7 Use the new Player::isDead function when it's the case 2015-03-13 08:57:58 +01:00
Loic Blot
afb19f3a1f handleCommand_Breath mustn't update breath is player is dead. A dead player doesn't breath.
Add Player::isDead function to check player is dead
2015-03-12 11:27:28 +01:00
Loic Blot
3067d78216 Don't handle PlayerPos packet coming from client if player is dead 2015-03-12 10:32:16 +01:00
paramat
6ce0985f47 Mgv5/mgv7: Add desert temples if desert stone detected in mapchunk 2015-03-12 02:33:16 +00:00
est31
140245a76f Unescape tooltip texts
Previously, tooltips didn't unescape escaped formspec texts.
Item descriptions that trigger tooltips like inside inventories or for item_image_button
don't need to get unescaped, as they don't get set using formspec, but from lua.
2015-03-11 14:33:07 +01:00
paramat
29e46d6b29 Mgv6: Fix uninitialised heightmap used by cavegen 2015-03-11 06:04:07 +00:00
paramat
b2b6bbf3e8 lua_api/l_mapgen: Fix overlapping areas of minetest.generate_ores/decorations 2015-03-11 03:36:39 +00:00
ShadowNinja
adfcdc5484 Silence Clang warning 2015-03-10 20:47:52 -04:00
Craig Robbins
d4e210ee95 Ensure that heightmap is initialized before use
Without this, cavegen will use values in the heightmap before they are initialized.
2015-03-10 18:46:28 +10:00
Craig Robbins
e74b8da54e Stop formspecs closing with double-click in empty area
Behaviour on Android remains the same until other alternatives can be devised (if possible)

See #2425 (and the many other -- now closed -- issues reporting this feature as a bug)
2015-03-09 12:42:25 +10:00
Loic Blot
3ae16f1c17 Fix memleak pointed by issue #2439.
Also change bzero to memset. bzero doesn't work on windows
2015-03-08 18:13:27 +01:00
Loic Blot
57d86cf574 Fix unitialized data when creating TOSERVER_INIT packet 2015-03-08 18:03:43 +01:00
ShadowNinja
969413b9fa Make the dummy backend only look up blocks once 2015-03-08 03:16:40 -04:00
paramat
d463000595 Heightmaps: Fix uninitialised values in mgv5/mgv6. findGroundLevel: Return -MAP_GENERATION_LIMIT if surface not found 2015-03-08 03:54:03 +00:00
gregorycu
267c9f4cb4 Optimize Profiler::avg() 2015-03-07 20:04:01 -05:00
ShadowNinja
d75a0a7394 Don't use luaL_checkstring to read node names, it's only for arguments
This caused confusing error messages like "argument #4 to set_node is not a string."
2015-03-07 20:04:01 -05:00
ngosang
f6e4c5d9cf Respect game mapgen flags and save world noise params 2015-03-07 15:53:39 -05:00
sapier
9da99efca2 Fix RUN_IN_PLACE broken due to invalid usage of assert 2015-03-07 15:22:35 +01:00
Craig Robbins
ced6d20295 For usages of assert() that are meant to persist in Release builds (when NDEBUG is defined), replace those usages with persistent alternatives 2015-03-07 22:41:47 +10:00
Loic Blot
a603a76787 Improve Clouds::render mathematics 2015-03-07 13:27:43 +01:00
Craig Robbins
5698e2baf8 Fix Android text bug (no text displaying) 2015-03-07 20:51:07 +10:00
paramat
ffdf8dedb7 Dungeongen: Optionally set ignore to be untouchable to disable floating dungeons 2015-03-07 01:41:53 +00:00
ShadowNinja
e9eda2b0d0 Don't start a server for map migration 2015-03-06 00:20:45 -05:00
ShadowNinja
708337dfc2 Clean up database API and save the local map on an interval 2015-03-06 00:20:45 -05:00
paramat
c7454d4732 Biome API: Enable decorations placed on water
Add schematic decoration force placement flag
2015-03-06 03:32:15 +00:00
BlockMen
b65c7ab4a4 Improve group-based connection between raillike nodes 2015-03-05 23:24:32 +01:00
Loic Blot
40c2c18a3f l_get_modnames: Compare using std::sort instead of a custom function which does same work 2015-03-05 20:12:54 +01:00