204 Commits

Author SHA1 Message Date
Loic Blot
fa9145128a 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
c468ca4821 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
ee42254b45 Send Breath packet on event, don't check it at each AsyncRunStep 2015-03-03 16:33:20 +01:00
Loic Blot
14e866c4a6 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
Craig Robbins
102e0ee00d Change find_surface_nodes_in_area to find_nodes_in_area_under_air 2015-02-27 21:42:00 +10:00
Loic Blot
0d823b300e 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
paramat
a5bcca8305 Biome API: Re-calculate biome at every surface in a mapchunk column 2015-02-26 03:35:25 +00:00
Kahrl
eb49a8d55e 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
est31
22ea6a5d81 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
Loic Blot
ad693a80de 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
Loic Blot
1905f12b61 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
Loic Blot
eb9db33a62 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
ngosang
b19cbb43a0 Fix .zip extraction (mod store) 2015-02-12 15:27:20 +01:00
ShadowNinja
0a2e53077b Reduce gettext wide/narrow and string/char* conversions 2015-02-05 03:24:22 -05:00
kwolekr
87330183bf Fix all warnings and remove -Wno-unused-but-set cflag 2015-01-18 23:29:19 -05:00
kwolekr
5bb6adee32 Reorganize supported video driver query mechanisms 2015-01-18 13:24:25 -05:00
kwolekr
66b0d25786 Add ability to delete MapBlocks from map
Also add a Lua API and chatcommand for this
2015-01-15 16:48:56 -05:00
rubenwardy
056427477e Fix direction property of HUD 2015-01-07 20:51:47 +01:00
kwolekr
02e06b423e Shorten ManualMapVoxelManipulator to MMVManip 2015-01-05 02:42:27 -05:00
kwolekr
97c7e9a5f6 Optionally specify propagateSunlight area in calcLighting
This fixes the Mapgen V5 calcLighting segfault
2015-01-05 01:20:36 -05:00
kwolekr
c659967d1c Exclude vertical mapblock borders when setting light 2015-01-04 23:14:16 -05:00
kwolekr
5370bf9a50 Add minetest.generate_ores() and minetest.generate_decorations() 2015-01-04 22:38:48 -05:00
kwolekr
1c2805b733 Add warning about using deprecated fields in Mapgen API and update docs 2015-01-04 03:24:40 -05:00
kwolekr
8d594e6799 LuaVoxelManip: Error when given out-of-bounds area 2015-01-04 03:07:28 -05:00
kwolekr
7ba812f028 Lighting: Fix nearly all issues
The cause of a single light source seemingly being lit without spread
was due to its creation in the +Y mapblock boundary layer during map
generation, which was ignored as the overtop.  This overtop explicitly
needs to be omitted during sunlight propagation, however.  To accomplish
this, Mapgen::calcLighting() was split into separate functions taking
separate parameters.
Additionally, do not diminish light too early during spread.  This fixes the
output inconsistency between Map::updateLighting and Mapgen::calcLighting.
2015-01-04 02:42:31 -05:00
kwolekr
d49f1250f5 Replace instances of height_min/height_max with y_min/y_max to remove ambiguity 2014-12-30 01:48:20 -05:00
kwolekr
7866b3811f Decoration: Fix default parameter values 2014-12-30 00:52:40 -05:00
kwolekr
6a136cf876 Add core.get_mapgen_names() to Main Menu API (and use it)
Also rewrite mapgen registration for static initialization
2014-12-29 21:23:51 -05:00
kwolekr
eb208e6b75 Expose mapgen parameters on scripting init
Add minetest.get_mapgen_params()
Deprecate minetest.register_on_mapgen_init()
2014-12-29 12:59:59 -05:00
kwolekr
2e5d9bb332 LuaVoxelManip: Remove blank allocator 2014-12-29 01:31:37 -05:00
kwolekr
3814cafc24 LuaItemStack: Fix and document behavior of set_name, set_count, set_wear, set_metadata 2014-12-28 23:59:24 -05:00
kwolekr
4437065263 Decoration: Add height_min and height_max parameters
Also set default height_min/height_max to -31000 and 31000,
respectively, for ore and biomes
2014-12-28 22:37:27 -05:00
paramat
3cb4ccc0f4 Biome API: Add shore top and shore filler nodes, underwater node, water top node. Add water top depth and shore height parameters. Remove water dust node 2014-12-28 21:37:43 -05:00
kwolekr
c4a39d536f Ore: Add Vein ore type 2014-12-28 21:17:12 -05:00
kwolekr
c176763482 Ore: Add Blob ore type 2014-12-28 03:11:00 -05:00
kwolekr
20b9e50aa9 LuaVoxelManip: Add option to allocate blank data 2014-12-27 23:09:36 -05:00
kwolekr
b68dcb323d Set fallback content if resolving content vector requires everything 2014-12-27 22:20:04 -05:00
kwolekr
2aa53ba603 Redefine NodeResolver interface and replace with callback mechanism 2014-12-27 02:12:21 -05:00
kwolekr
b9b9df261b LuaPerlinNoiseMap: Fix 3d noise safety check 2014-12-12 22:58:44 -05:00
kwolekr
2906d0620b Add minetest.clear_registered_decorations() and clear_registered_ores() 2014-12-12 14:08:04 -05:00
kwolekr
d8ab7d2124 LuaPerlinNoiseMap: Prevent invalid memory access when attempting to generate 3d noise with a buffer created for 2d 2014-12-12 02:46:52 -05:00
kwolekr
a3e54044a9 Add support for NoiseParams in minetest.get_perlin() and add docs on NoiseParams to lua_api.txt 2014-12-12 02:02:44 -05:00
kwolekr
4433cb3626 Settings: Fail on invalid sequence and throw exception for LuaSettings 2014-12-12 00:44:17 -05:00
kwolekr
6f398af64f Noise: Automatically transform noise maps if needed 2014-12-10 23:35:37 -05:00
kwolekr
d27d023219 Move get_schematic and read_schematic to l_mapgen.cpp 2014-12-10 01:49:57 -05:00
kwolekr
0f4d8ddf95 Remove get_noiseparams function. read_noiseparams should be used from now on 2014-12-10 00:56:44 -05:00
kwolekr
180c455ab1 Noise: Create a deep copy of NoiseParams 2014-12-10 00:37:09 -05:00
kwolekr
4119cf9f6d Settings: Sanitize setting name everywhere, not just LuaSettings 2014-12-09 23:52:13 -05:00
kwolekr
fefcad5137 Rename and repurpose minetest.set_noiseparam_defaults to set_noiseparams 2014-12-09 23:44:04 -05:00
kwolekr
22b22968a1 Add flags and lacunarity as new noise parameters
Add 'absolute value' option to noise map functions
Extend persistence modulation to 3D noise
Extend 'eased' option to noise2d_perlin* functions
Some noise.cpp formatting fixups
2014-12-07 21:59:32 -05:00