1
0
mirror of https://github.com/minetest/minetest.git synced 2024-06-29 23:16:04 +02:00
Commit Graph

3447 Commits

Author SHA1 Message Date
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
Loic Blot
40bf1d7b5f Send Position packet on event, don't check it at each AsyncRunStep.
* This permit to cleanup the player checking loop
2015-03-04 12:19:26 +01:00
Loic Blot
7f8f9785d7 ASyncRunStep doesn't need to lock when do setTimeOfDaySpeed.
* setTimeOfDaySpeed already lock a mutex when modify the value, we don't need to lock all environment.
* add a fine grain lock for getTimeOfDay and setTimeOfDay to solve environment multithread modifications on this value
2015-03-04 11:46:31 +01:00
Loic Blot
1b2f64473e Send Inventory packet on event, don't check it at each AsyncRunStep.
* Call UpdateCrafting into SendInventory because this functions is only called before SendInventory
* Use Player* instead of peer_id for UpdateCrafting because SendInventory already has the Player* pointer, then don't loop for searching Player* per peer_id
* m_env_mutex don't need to be used with this modification because it's already locked before the calls
2015-03-04 11:29:39 +01:00
Loic Blot
038d3a31df Remove unused m_wielded_item_not_sent 2015-03-03 17:36:54 +01:00
Loic Blot
7e56637ed0 Send Breath packet on event, don't check it at each AsyncRunStep 2015-03-03 16:33:20 +01:00
Loic Blot
64ff966bae Send Player HP when setHP (or a setHP caller) is called instead of looping and testing the state change. 2015-03-03 16:06:04 +01:00
Miguel Almeida
056e8f7839 Fix occlusion 2015-03-02 12:09:02 +01:00
Craig Robbins
aefe80769b Fix narrow_to_wide_c (ANDROID)
* Ensure converted string is NUL terminated
* Restore logic to that used prior to 9e2a9b5
2015-03-02 13:16:01 +10:00
paramat
773aa8c57b Mgv6: Add heightmap. Do not make large caves that are entirely above ground 2015-03-02 02:13:43 +00:00
Loic Blot
3b1ac5b889 Revert "Fix particles draworder" (issue #2388)
This reverts commit c09d026f05.
2015-02-27 14:15:24 +01:00
Craig Robbins
fdb9140825 Change find_surface_nodes_in_area to find_nodes_in_area_under_air 2015-02-27 21:42:00 +10:00
Loic Blot
0f556d0c7f Add find_surface_nodes_in_area LUA call which permit to only get the nodes which touch air. This permit to massively improve performance for mods like plantlife 2015-02-27 21:34:33 +10:00
Craig Robbins
338e66af5f Fix minor memory leak (Android) 2015-02-27 13:40:27 +10:00
paramat
14f7df980b Biome API: Re-calculate biome at every surface in a mapchunk column 2015-02-26 03:35:25 +00:00
rubenwardy
d65a90a86b Add camera smoothing and cinematic mode (F8) 2015-02-25 15:34:33 +01:00
Loic Blot
b4acac706d Rename --do-unittests to --run-unittests as @Zeno- and @sfan5 requested 2015-02-24 08:56:52 +01:00
gregorycu
577701cabd Optimise MapBlockMesh related functions
Directely or indirectly optimises the following functions:

* MapBlockMesh::MapBlockMesh
* MapBlockMesh::getTileInfo
* MapBlockMesh::makeFastFace
* MapBlockMesh::getSmoothLightCombined
2015-02-23 23:20:31 +10:00
Craig Robbins
3b6480c5b0 Fix wrapDegrees family of functions
wrapDegrees() (renamed to modulo360f)
wrapDegrees_0_360
wrapDegrees_180

Minor errors were present in previous versions; see issue #2328
2015-02-23 22:50:32 +10:00
Kahrl
38cf080a9c Disallow object:remove() if the object is a player
Rebased by Zeno- (conflict in lua_api.txt)
2015-02-23 16:49:48 +10:00
kaeza
c5defe7a11 Add mod.conf file support This new file only permits to specify a mod name for now 2015-02-21 18:18:06 +01:00
Loic Blot
009149a073 Fix some memory leaks on packet sending. 2015-02-21 17:27:31 +01:00
Loic Blot
5a5854ea9d Move hex.h to util/ 2015-02-21 14:32:35 +01:00
BlockMen
c09d026f05 Fix particles draworder 2015-02-21 14:11:00 +01:00
Loic Blot
3998a1f8f9 Move sha1.hpp and base64.hpp to util/ 2015-02-21 14:03:27 +01:00
BlockMen
aa31e3c7f3 Use skin font for usernames (fixes #2363) 2015-02-21 13:31:42 +01:00
Loic Blot
cf4045ff0f Use proper CMakeLists.txt for network and client directories 2015-02-21 11:51:12 +01:00
Loic Blot
b3aeba684b Unit tests must be done at integration process.
* Remove --enable-unittests and --disable-unittests and add --do-unittests function
* --do-unittests function will exit 0 on success.
* minetest and minetestserver binaries are launched with --do-unittests in travis build.
2015-02-21 11:04:19 +01:00
paramat
38e6280552 Mgv5: Remove blobgen. Remove crumble and wetness noises
Add large pseudorandom caves below -256
De-link terrain level from water_level
Cavegen: Mgv5 large cave code
2015-02-21 01:43:25 +00:00
Ner'zhul
e357577cb2 Typo fix in networkprotocol.h
InventoryAction is in inventorymanager.h
2015-02-19 20:03:22 +01:00
est31
5a0ed780f5 Server: announce MIN/MAX protocol version supported to serverlist. Client: check serverlist
Client now informs about incompatible servers from the list, this permits to prevent the protocol movements.
Server announces its supported protocol versions to master server
2015-02-18 16:09:59 +01:00
BlockMen
8941ea0cc9 Increase default font_size 2015-02-18 12:51:17 +01:00
BlockMen
9a9fcfc9a3 Fix font_size under windows 2015-02-18 12:39:23 +01:00
Perttu Ahola
4d744cf87a Use fixed size for builtin menus on non-android platforms 2015-02-18 12:33:40 +02:00
Loic Blot
27d4e89d32 Fix unused (and so, broken) enable_rollback_recording. This option must be reloaded at server loop but loaded when server starts, for data consistency (not a hot load variable)
ok @ShadowNinja
2015-02-18 09:28:39 +01:00
fz72
0a299fd4e5 Fix map_seed not changed when creating a new world after login to another 2015-02-18 08:57:14 +01:00
Loic Blot
2079462e62 Change many useless std::list into Environment class (m_players), ABMHandler and ActiveBlockList::update
This improve looping performances.
2015-02-17 16:50:03 +01:00
Kahrl
81b9c023c4 Grab GUIChatConsole::m_font, fixes segfault when changing font_size 2015-02-18 00:38:57 +10:00
Loic Blot
fd70f4f2f0 Replace std::list by std::vector into ClientMap::updateDrawList, Map::timerUpdate and ServerMap::save().
This will speedup the loop reading into those functions
2015-02-17 15:28:49 +01:00
Loic Blot
3c91ad8fc2 Replace std::list by std::vector into timerUpdate calls 2015-02-17 15:08:37 +01:00
Novatux
24315db6ef Ignore old entities from 0.3. 2015-02-17 15:07:05 +01:00
Loic Blot
54487b3e70 Remove old comment from Network Rework Patch 2/4 2015-02-17 14:49:21 +01:00
Loic Blot
718bcafd51 Replace std::list by std::vector into ServerMap::listAllLoadableBlocks ServerMap::listAllLoadedBlocks and their database backends.
This adds a speedup on database migration and /clearobjects command
2015-02-17 14:35:44 +01:00
Loic Blot
c58d49977d SAO: re-add old ActiveObjectTypes for a future migration layer 2015-02-17 11:37:55 +01:00
Loic Blot
f8d5af7536 SAO work: ActiveObject types & SAO cleanup * Replace u8 types with ActiveObjectType. * Merge content_object.h into activeobject.h * Remove DummyLoadSAO, it's now unused. * Remove ItemSAO, it's also unused 2015-02-17 09:09:50 +01:00
Yaman
98d80e2012 Add player direction to on-screen debug text
(PR Modified slightly)
2015-02-17 01:56:21 +10:00
Loic Blot
7c8793cbea Performance Improvement: Use a cache which caches result for getFacePositions.
This greatly reduce the number of std::list generated by caching the result, which is always constant for each radius selected.
In the callgrind map, you will see original:
  * 3.3M calls to std::list for 9700 calls to getFacePositions
In the modified version, you will see:
  * 3.3K calls to std::list for 6900 call to getFacePositions
Callgrind map is here: #2321

it's a huge performance improvement to l_find_node_near
2015-02-16 11:27:44 +01:00
Loic Blot
ed04e8e9e4 [Patch 2/4] Network rework: packet writing, sending and cleanups
NetworkPacket.cpp:
* Remove some deprecated functions, we must use streaming interface
* m_data converted from u8* to std::vector<u8>
* Add an exporter to forge packet to Connection object
* implement operator << std::wstring. n
* implement operator << std::string
* dynamic resize when write packet content.
* fix string writing and performances.
* create ServerCommandFactory, used by client to get useful informations about packet processing (sending).
  * Reliability
  * Transmit channel
* Implement putRawString for some ugly char (_INIT packet), and use it.
* Many packet read and write migrated
* Implement oldForgePacket to interface writing with current connection
* fix U8/char/bool writing
* fix string writing and performances.
* add some missing functions
* Use v3s16 read instead of reading x,y,z separately
* Add irr::video::SColor support into packets
* Add some missing handlers
* Add a template function to increase offset
* Throw a serialization error on packet reading (must be improved)

PacketFactories:
* Create ServerCommandFactory, used by client to get useful informations about packet processing (sending).
* Create ClientCommandFactory, used by server to get useful informations about packet processing (sending).

Client.cpp:
* implement NetworkPacket ::Send interface.
* Move packet handlers to a dedicated file
* Remove Client::Send(SharedBuffer)

Server.cpp:
* implement NetworkPacket ::Send interface.
* Rewrite all packets using NetworkPacket
* Move packet handlers to a dedicated file
* Remove Server::Send(SharedBuffer)

ClientIface.cpp:
* Remove sendToAll(SharedBuffer<u8>)

Connection.hpp rework:
* Remove duplicate include
* Remove duplicate negation
* Remove a useless variable
* Improve code performance by using a m_peers_list instead of scanning m_peers map
* Remove Connection::Send(SharedBuffer)
* Fix useafterfree into NetworkPacket Sending
* Remove unused Connection::sendToAll

Test.cpp:
* Remove dead code
* Update tests to use NetworkPackets

Misc:
* add new wrappers to Send packets in client, using NetworkPacket
* Add NetworkPacket methods for Connection
* coding style fix
* dead code since changes cleanup
* Use v3s16 read instead of reading x,y,z separately in some packets
* Use different files to handle packets received by client and server
* Cleanup: Remove useless includes

ok @Zeno-
Tested by @Zeno- @VanessaE and @nerzhul on running servers
2015-02-16 11:00:55 +01:00
Loic Blot
8aebc31a17 Fix unit test if there isn't a localhost address (for example FreeBSD jails), second part 2015-02-15 14:30:34 +00:00
Loic Blot
a3e2b3e404 Fix unit test if there isn't a localhost address (for example FreeBSD jails) 2015-02-15 13:11:03 +01:00
Loic Blot
3b6b9435c5 Only do the IPv6 unit test if IPv6 is enabled 2015-02-15 12:20:37 +01:00
Loic Blot
7880ff74b6 Re-apply 4a6582c13c broken since 146f77fdb7 2015-02-14 09:21:04 +01:00
Craig Robbins
d44cb547f2 Suppress CGUITTFONT build warnings 2015-02-13 23:54:05 +10:00
ngosang
c7a7803780 Minor fixes in translations 2015-02-12 16:41:40 +01:00
BlockMen
d302629392 Fix gettext on MSVC 2015-02-12 16:03:55 +01:00
ngosang
e102cbd840 Fix .zip extraction (mod store) 2015-02-12 15:27:20 +01:00
Loic Blot
146f77fdb7 main.cpp rework * Move ClientLauncher class to a dedicated file * ClientLauncher now owns print_video_modes and speed_tests functions (they are only called by him) * Move GameParams to shared/gameparams.h because it's shared between server and client and launcher need to know it * Move InputHandlers class to client/inputhandler.h * Cleanup includes 2015-02-12 15:00:03 +01:00
Loic Blot
a19ec3328c Remove unused variables to make clang happy 2015-02-12 11:13:27 +01:00
ngosang
4a6582c13c Small changes in the style of controls 2015-02-12 09:54:48 +01:00
Loic Blot
c3a23ebc28 Make Clang happy with lua lauxlib.c.
No functionnal change
2015-02-12 08:00:22 +01:00
est31
b2f3ffe308 Enable LUA_USE_POSIX if possible in bundled Lua
Fixes warning:
src/lua/src/loslib.c:60: Warning: the use of `tmpnam' is dangerous, better use `mkstemp'
2015-02-12 16:14:12 +10:00
Craig Robbins
66efaaa983 Fix Android compile warning 2015-02-12 13:16:38 +10:00
Loic Blot
a9355284b5 Don't permit to open inventory is playerCAO isn't present. This prevent to open an empty inventory at player load. ok @zeno- 2015-02-11 12:23:14 +01:00
Loic Blot
8252e1ecd0 Fix issue #2279. ok @zeno- 2015-02-11 10:03:29 +01:00
Craig Robbins
c8f60bd224 Remove workaround in itemdef.cpp to enable/disable/enable "enable_shaders" setting
* Increase performance (client)
* Avoid changing a global value to solve a local problem
2015-02-11 17:45:49 +10:00
ShadowNinja
98b37e3e0d Fix Android build of narrow_to_wide 2015-02-11 02:28:22 -05:00
Craig Robbins
f824866686 Revert "Remove workaround in itemdef.cpp to enable/disable/enable "enable_shaders" setting"
This reverts commit d25ff8fd25.
2015-02-11 17:01:19 +10:00
Craig Robbins
d25ff8fd25 Remove workaround in itemdef.cpp to enable/disable/enable "enable_shaders" setting
* Increase performance (client)
* Avoid changing a global value to solve a local problem
2015-02-11 16:02:16 +10:00
Markus Koschany
cfca5f99e6 Fix FTBFS on GNU/Hurd platform
Minetest fails to build on GNU/Hurd due to a name clash with OSX/Apple,
both are defining the __MACH__ keyword. This commit fixes the issue.
2015-02-11 15:59:58 +10:00
Craig Robbins
caf8d2a9d1 Increase MapBlock::actuallyUpdateDayNightDiff() performance by 2-8x. ok @celeron55
Before patch, function consumes up to ~8% of the main server loop. After, ~0% (below level of 2 places of significance)
2015-02-10 16:23:37 +01:00
Loic Blot
bb59a8543d Replace getPlayer(playername) by getPlayer(peer_id) in some possible cases. ok @Zeno- 2015-02-10 16:03:16 +01:00
Loic Blot
368496b612 Craftdef.cpp: Improve loop and mathematics for CraftDefinitionShaped::check 2015-02-10 14:16:28 +01:00
ngosang
dd2bb950be Fix Exit to OS button focus in Pause Menu 2015-02-10 21:23:16 +10:00
Loic Blot
a704c04f00 Network Layer 7 rework (Packet handling)
* Move networkcode to a dedicated directory
* Rename clientserver.h to network/networkprotocol.h (Better name) and sanitize some includes
* Create object NetworkPacket
  * It stores command (opcode) and data separated
  * It also stores peer_id
  * Data reading can be done by using a streaming interface
* Change packet routing analysis
  * Remove old conditional analysis
  * Now uses function pointed analysis and add connection state ({Client,Server}::handlers)
  * Connection state permit to categorize condition to handle before analyze packets
  * Create a handler for depreciated messages, instead of duplicating code
2015-02-10 20:04:08 +10:00
kwolekr
15c037614f Hud: Modify Y-positioning of health/breath starbars to prevent overlapping with Hotbar 2015-02-08 12:47:45 -05:00
gregorycu
a0535d286b Fix rebase bug, make render loop use cache setting 2015-02-07 22:23:36 +10:00
Craig Robbins
0904884ad4 Fix warnings in CGUITTFont.cpp 2015-02-06 23:02:15 +10:00
ShadowNinja
1367e8ffff Fix gettext 2015-02-05 11:49:14 -05:00
ShadowNinja
9e2a9b55e1 Reduce gettext wide/narrow and string/char* conversions 2015-02-05 03:24:22 -05:00
ShadowNinja
84c367bb46 Fix translation memory leak 2015-02-05 03:24:13 -05:00
ShadowNinja
8bbf106379 Fix translation finding of overlay messages 2015-02-05 03:24:00 -05:00
paramat
bec5d3ab22 Mgv7 mountains: Remove divide by zero code that creates vast walls
Conf.example: Add mgv7 cave1, cave2 noiseparams
Mgv7: Make skipping of mountain code relative to y=0 not water level
Mountain noise offset now -0.6 to compensate
Tune chance of large caves
2015-02-05 03:21:04 -05:00
Craig Robbins
9a0dd47057 Fix performance regression 2015-02-05 17:34:10 +10:00
SmallJoker
929e0b0ad8 Give full breath after death 2015-02-05 17:33:08 +10:00
gregorycu
5e075c3344 Fix dying of lava causes repeated death This is a bugfix for issue #81 2015-02-05 17:32:35 +10:00
ngosang
1b4aaa5f50 Suppress 4 gcc 4.9.2 warnings in CGUITTFont.cpp 2015-02-05 02:41:55 +10:00
sapier
d902bd31c4 Fix getCraftRecipe returing wrong reciep due to way to unspecific output matching 2015-02-02 21:32:23 +01:00
kwolekr
0118c111e8 Fix some MSVC-specific warnings and add debug path as an MSVC directory 2015-02-02 02:01:13 -05:00
kwolekr
43f102271d Create minidump on fatal Win32 exceptions
Remove software exception translator function, simplifying exception handler
macros.  FatalSystemExceptions are left unhandled.
2015-02-02 01:39:17 -05:00
kwolekr
48fa893abd Randomly generate seed if field blank for any Settings instance 2015-02-01 02:05:39 -05:00
Kahrl
285655a878 Fix NDT_GLASSLIKE normals
Remove inventorycube() workaround for default:glass in minimal game
2015-01-31 03:06:34 +10:00
Craig Robbins
38561023b4 Fix local map saving when joining a local server from the server tab
Disables local map saving for all local server types

See: https://github.com/minetest/minetest/issues/2024
2015-01-31 00:42:08 +10:00
Kahrl
4d15d63134 Fix uninitialized variable m_database_delete in Database_SQLite3
This fixes issue #2219
2015-01-28 05:01:07 +01:00
kwolekr
ad690c46b1 Write common mapgen params to map_meta.txt on world initialization 2015-01-27 22:29:28 -05:00
Loic Blot
80a7408e4d Fix a crash (assert) when client set serial version < 24 in INIT
When SER_FMT_VER_LOWEST is set to zero, then the test is stupid in INIT because all client works. In mapblock we check if client's serialization version is < 24, but if client sent serialization version < 24 (15 for example) the server set it and tried to send nodes, then BOOM

To resolve the problem:
* Create a different CLIENT_MIN_VERSION to handle this problem
* Remove the exception
* Use an assert in case of bad developer code
2015-01-27 16:55:25 +01:00
kwolekr
eeea454bff Fix missing map_meta.txt error when creating new worlds
A missing map_meta.txt should be treated simply as if there were a blank file.
2015-01-27 02:10:04 -05:00
Craig Robbins
ca217d0416 Revert "Fix a crash (assert) when client set serial version < 24 in INIT command SER_FMT_VER_LOWEST is set to zero, then the test is stupid in INIT because all client works. In mapblock we check if client's serialization version is < 24, but if client sent serialization version < 24 (15 for example) the server set it and tried to send nodes, then BOOM"
nerzhul is (may?) be working on a new solution. For the moment this is reverted because old worlds cannot be loaded (see discussion on github for the commit).

This reverts commit 800d192702.
2015-01-27 00:39:33 +10:00
gregorycu
5b55deb1eb Suppress MSVC warning in chat.cpp 2015-01-25 16:09:23 +10:00
gregorycu
ed7c9c4cb8 Settings fixes Make the GameGlobalShaderConstantSetter use the settings callback (8% perf improvement in game loop) Ensure variable is set Ensure settings callback is threadsafe 2015-01-25 15:23:37 +10:00
Craig Robbins
2c4a5e1861 Revert "Make the GameGlobalShaderConstantSetter use the settings callback (8% perf improvement in game loop)"
This reverts commit a555e2d9b0.
2015-01-25 01:19:40 +10:00
(@U-Exp)
800d192702 Fix a crash (assert) when client set serial version < 24 in INIT command SER_FMT_VER_LOWEST is set to zero, then the test is stupid in INIT because all client works. In mapblock we check if client's serialization version is < 24, but if client sent serialization version < 24 (15 for example) the server set it and tried to send nodes, then BOOM 2015-01-24 22:41:02 +10:00
Kahrl
f8bd1f3563 Fix uninitialized variable Server::m_next_sound_id 2015-01-24 06:44:41 +01:00
Craig Robbins
0ea843bbdb Fix unitialised variable occassionally being used 2015-01-24 14:54:42 +10:00
gregorycu
a555e2d9b0 Make the GameGlobalShaderConstantSetter use the settings callback (8% perf improvement in game loop)
Amend the settings callback to support userdata
2015-01-23 21:27:51 -05:00
paramat
aafbbcd537 Mgv5: Skip calculation of filler, heat and humidity perlinmaps in underground mapchunks 2015-01-23 21:24:47 -05:00