Commit Graph

3351 Commits

Author SHA1 Message Date
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 0e5e49736c 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 467fc0ddc9.
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: 1b2f64473e
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 9749d9fee6, 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 f6e4c5d9cf .
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 5f8e48c63b.
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
Loic Blot c00eed90d3 collisionMoveSimple: use std::vector instead of std::list, this improve the performances 2015-03-05 18:08:19 +01:00
Loic Blot 6c09b34edc ProfilerGraph: Use std::list instead of std::vector 2015-03-05 17:57:47 +01:00
Craig Robbins daa1c30b35 Fix mapgen using unitialised height map values 2015-03-06 01:42:55 +10:00
Loic Blot 3d505b2b5f Use std::queue for HTTPFetchRequest and std::vector for log_output instead of std::list 2015-03-05 16:21:10 +01:00
Loic Blot 9749d9fee6 Fix issue #2441: crash on respawn, since a conversion std::list to std::vector on Environment.cpp
* Also change some std::list to std::vector for ClientMap::renderMap
* Remove disabled code in ClientMap::renderMap, disabled since a long time
2015-03-05 15:36:20 +01:00
Loic Blot 0d1eedcccc Replace std::list to std::vector into tile.cpp (m_texture_trash) and move tile.hpp to src/client/ 2015-03-05 11:59:40 +01:00
Loic Blot aa474e4501 Server.cpp Use std::list instead of std::vector for playSound, fillMediaCache, sendRequestedMedia, sendMediaAnnouncement and related functions 2015-03-05 11:40:04 +01:00
Loic Blot 82482ecd9d Server::AsyncRunStep: buffered_messages now uses std::vector instead of std::list. * sendRemoveNode and sendAddNodes are also converted as a side effect 2015-03-05 11:23:54 +01:00
BlockMen 36e8ba9ce2 Fix some rendering glitches
- Fixes particle draworder
- Fixes nodehighlighting
2015-03-05 10:51:18 +01:00
Loic Blot 365e4ae0fa Performance improvement: Use std::list instead of std::vector for request_media, Server::getModNames, Environment::m_simple_objects.
* Also remove unused Server::m_modspaths
2015-03-05 10:44:48 +01:00
Loic Blot b214cde5b4 Remove Queue class which uses std::list and use native std::queue 2015-03-05 16:49:51 +10:00
Craig Robbins 9e67579315 Fix memory leak in MapgenV6 2015-03-05 15:17:37 +10:00
paramat eb7482fd73 Cavegen, mgv5: Cleanup code
Conf.example: Update mgv5 mapgen params
Mgv7: Lava caves only below -256
2015-03-04 23:53:58 +00:00
Loic Blot cd684497c2 Use std::vector instead of std::list in StaticObjectList and MutexedMap::getValues() 2015-03-04 17:22:37 +01:00
Loic Blot 06f328207f ABMHandler and player_collisions use sequential read/write. Switch from std::list to std::vector
* Also remove dead code Map::unloadUnusedData which is dead since a long time
2015-03-04 17:02:36 +01:00
Loic Blot 2066655aae ClientInterface::getClientIDs doesn't need a std::list. Use a std::vector for better perfs 2015-03-04 16:30:24 +01:00
Loic Blot 7e088fdfe3 We always know playerSAO when calling SendInventory. Using it instead of searching it via peer_id 2015-03-04 15:28:33 +01:00