kwolekr
f062bbd7a1
Add /emergeblocks command and core.emerge_area() Lua API
2015-09-23 15:56:24 -04:00
Loic Blot
596484da4f
Save and remove player by pointer
...
Why doing things simple ? Use pointer instead of strings to save players and remove them.
Saving players by name does a lookup to find pointer we already have ! Idem with removePlayer
Also remove unused removePlayer(peer_id), it's never called
2015-09-23 19:37:05 +02:00
paramat
a56aedb4ea
Mapnode: Add rotateAlongYAxisFull supporting 24 facedirs
2015-09-22 20:54:25 +01:00
est31
452df1c723
Various style cleanups + unused code removal
...
-> Don't pass pointer to whole IGameDef to NodeMetadata constructors
and deserializers, but only to IItemDefManager, which is needed
-> Remove the unused content_mapnode_get_new_name() method
-> Fix style for MapBlock::deSerialize and MapBlock::deSerialize_pre22,
improving accuracy of error messages a bit
-> Fix style at other serialisation methods too
-> Improve accuracy of some comments
2015-09-19 20:57:29 +02:00
Loic Blot
9c635f28ac
Little optimization on getAdded/Removed activeobjects per player loop.
...
Use std::queue instead of std::set, we don't need such a heavy container.
Don't convert position to int to convert it back to float in the next function.
2015-09-19 20:57:07 +02:00
paramat
fe994946b7
Mgv5/6/7: Re-add #include profiler.h as commented-out option
2015-09-19 02:27:21 +01:00
paramat
795db97fe3
Blob ore: Fix partial blobs
2015-09-19 02:27:00 +01:00
est31
94f1e5d9bd
Send proper block to old clients for swap_node calls
...
The legacy code added in commit
d879a539cd19ddd1ee34afec2512fb2238de2822 - "Add minetest.swap_node"
for sending the whole mapblock to older clients on the case of a node
modification with swap_node, had the problem that the block chosen to be
sent to the client was referenced with node coordinates and not with
block coordinates, resulting in getting the wrong block sent to the client.
2015-09-17 20:23:31 +02:00
kwolekr
dcbb95338a
Ore: Add puff ore type
2015-09-17 03:04:50 -04:00
est31
6c81be51ff
Fix object position border checking
...
Borders have to be converted into BS format in order to be accurately comparable to
object positions.
2015-09-16 17:39:49 +02:00
est31
f61f817b9c
Disallow placing entities outside safe boundaries
...
Entity positions are serialized as F1000. Disallow placing
entities outside safe borders with the minetest.add_entity
call.
Note that this patch only enforces those boundaries for
placing entities, moving entities that move outside boundaries
aren't affected.
Thanks to @nanepiwo for pointing this out.
2015-09-15 19:45:17 +02:00
paramat
8e9c9e305a
Firelike drawtype: Improve code
...
Remove unusable fine rotation by param2
Remove unused and redundant code
Fix code style issues
2015-09-14 08:04:01 +01:00
est31
283bf97a1c
Serialisation: documentation fixes, clarifying renames and whitespace fixes
...
1. Do two renames:
* SER_FMT_CLIENT_VER_LOWEST -> SER_FMT_VER_LOWEST_WRITE
* SER_FMT_VER_LOWEST -> SER_FMT_VER_LOWEST_READ
Now the two define values are consistently named with the _WRITE defines
SER_FMT_VER_{HIGHEST,LOWEST}_WRITE, and to better point out what the two
serialisation versions actually are for.
2. wrap some lines in doc/worldformat.txt, and point out that the node
timers are serialized at a later point, as this can cause confusion about
what now happens (if one doesn't strictly read the if block's conditions).
3. some whitespace fixes in NodeTimerList::serialize, and one new comment.
2015-09-14 07:02:15 +02:00
kwolekr
beba969413
Ore: Add ore sheet column height range selection
...
Modders are now able to select the range of ore column height,
and the midpoint at which they 'grow' starting from.
This commit adds three new parameters for the 'sheet' ore type:
column_height_min, column_height_max, and column_midpoint_factor.
clust_size is now deprecated for this ore type.
2015-09-13 00:11:50 -04:00
est31
64a5eec1bd
networkprotocol.h: remove "u16 command" from doc
...
Its obvious that "u16 command" is inside every packet, therefore this
commit removes all mentions of the command, if non-array like notation
is used. We already didn't add "u16 command" to new packets or removed
it at packet changes, so now we remove it from existing packets.
2015-09-10 10:26:00 +02:00
est31
2a9da62b21
Improve locale directory detection
...
Use in-place locale directory if that exists, and
static one (RUN_IN_PLACE or CUSTOM_LOCALEDIR) doesn't exist.
Report to errorstream if neither static nor in-place locale
dirs exist, and report successfully found paths to infostreem.
Fixes two bugs:
-> Regression of commit [1] where if we use RUN_IN_PLACE=false,
but don't make install, locales aren't found. One might
think this is no regression, as its no bug, but all other
paths (mainmenu, etc.) are detected properly.
-> Regression of commit [1] where locales don't work on windows.
References:
[1]: Commit 645e2086734e3d2d1ec95f50faa39f0f24304761 "Use CUSTOM_LOCALEDIR if specified" by @ShadowNinja
2015-09-10 08:32:58 +02:00
Loic Blot
1f1e14ab7f
Change m_client_event_queue's type to std::queue
...
As indicated in its name, m_client_event_queue should be a queue.
Change std::list to std::queue to improve the queue's performance.
2015-09-08 21:23:09 +02:00
paramat
4967e483b6
Mgv5/mgv7 biomes: Reduce heat and humidity noise spreads to former value of 750
2015-09-07 02:56:20 +01:00
ShadowNinja
645e208673
Use CUSTOM_LOCALEDIR if specified
2015-09-06 11:21:26 +02:00
Pavel Puchkin
588f0c1fb0
Fix building on OSX, broken since "Clean up threading"
...
Commit
e4bff8be94c0db4f94e63ad448d0eeb869ccdbbd - Clean up threading
by @ShadowNinja has broken the OSX build.
Including things inside a namespace isn't good.
Also fixes #3124 .
2015-09-06 05:34:02 +02:00
est31
2035bfc3a6
Areastore: fix "attempt to index a number value"
...
Before, calling get_areas_in_area for an areastore with both
include_borders and include_data would result in a lua error,
if there was at least one area as result:
attempt to index a number value in function 'get_areas_in_area'
2015-09-03 06:17:02 +02:00
ShadowNinja
e511282d78
Warn when building without cURL
2015-09-01 14:43:59 -04:00
ShadowNinja
7419504079
Enable server build when no builds are enabled
2015-09-01 14:43:59 -04:00
est31
0903190ba2
Hide minimap if it has been disabled by server
2015-09-01 19:00:33 +02:00
jh10001
dce9468925
gettext.cpp: Fix syntax error when using MSVC
...
Also remove trailing whitespaces from the file
2015-09-01 00:26:11 +02:00
est31
2c637ce1c2
Make ClientInterface::statenames consistent with the state enum again
...
Fixes minetest.get_player_information segfault due
to out of bounds access problems, when compiled as debug build.
2015-08-31 13:31:29 +02:00
est31
9c44aace4f
l_mainmenu.h: remove unused l_get_dirlist function
...
The commit
8f9af57314f71aae1cc77e13f9996e13015d776d "Add core.get_dir_list" by @ShadowNinja
has removed the implementation of the l_get_dirlist function and all its usages
from the l_mainmenu.cpp file, but hasn't removed it from the header file.
The reason why this hasn't been detected earlier is that C++ has this interesting
feature to still make it possible to create instances of classes whose never used
private methods are declared but not defined.
2015-08-30 01:17:03 +02:00
Gael-de-Sailly
18973f9af1
Ores: change ore chance in clusters to better respect clust_num_ores for dense clusters
2015-08-29 23:30:17 +01:00
paramat
17b7b7c85f
Dungeongen: Remove floating frames
...
Preserves the rare unbroken protruding dungeons
Fix random range for first room roomplace
Fix checked volume for first room 'fits' bool
and check for 'untouchable' flag instead of 'inside'
Remove 'enable floating dungeons' setting
2015-08-29 06:27:29 +01:00
Kahrl
3304e1e517
Push error handler afresh each time lua_pcall is used
...
Fixes "double fault" / "error in error handling" messages
(issue #1423 ) and instead shows a complete backtrace.
2015-08-27 01:56:06 +02:00
Kahrl
8658c8d9b5
Use numeric indices and raw table access with LUA_REGISTRYINDEX
2015-08-27 01:56:06 +02:00
David Jones
34b7a147dc
Change i++ to ++i
2015-08-25 18:33:52 -04:00
ShadowNinja
e4bff8be94
Clean up threading
...
* Rename everything.
* Strip J prefix.
* Change UpperCamelCase functions to lowerCamelCase.
* Remove global (!) semaphore count mutex on OSX.
* Remove semaphore count getter (unused, unsafe, depended on internal
API functions on Windows, and used a hack on OSX).
* Add `Atomic<type>`.
* Make `Thread` handle thread names.
* Add support for C++11 multi-threading.
* Combine pthread and win32 sources.
* Remove `ThreadStarted` (unused, unneeded).
* Move some includes from the headers to the sources.
* Move all of `Event` into its header (allows inlining with no new includes).
* Make `Event` use `Semaphore` (except on Windows).
* Move some porting functions into `Thread`.
* Integrate logging with `Thread`.
* Add threading test.
2015-08-23 22:04:06 -04:00
RealBadAngel
980d095e32
tileable flags are needed also without shaders because of filters
2015-08-20 03:42:22 +02:00
RealBadAngel
8b8d17b22b
Remove use of engine sent texture tiling flags - theyre no longer needed
2015-08-20 02:41:40 +02:00
Rui
3a2bfd4548
Fix indianred and indigo of color-string
2015-08-19 19:49:45 +02:00
est31
457d42c599
Android: bypass broken wide_to_utf8 with wide_to_narrow (again)
...
This bypass had to be re-enabled as some users reported issues,
even after the iconv build fix.
While utf8_to_wide works well, wide_to_utf8 is quite broken
on android, for some reason, and some devices (unrelated from build
configuration).
2015-08-19 18:38:00 +02:00
est31
1fadf7f21e
Fix inventory replace bug
2015-08-19 03:42:00 +02:00
kwolekr
c2d23ff9cc
SAPI: Disable unlockable time profiling
2015-08-18 01:26:11 -04:00
kwolekr
bcf38a2ad1
SEnv: Remove static_exists from ActiveObjects in deleted blocks
2015-08-16 15:55:07 -04:00
onkrot
5556ba168f
Remove unused functions.
2015-08-16 14:29:33 +02:00
paramat
ee6cad1546
Defaultsettings: Increase client_mapblock_limit to 5000
2015-08-15 20:29:30 +01:00
kwolekr
0ba1cf8203
Rollback: Fail on bad precondition instead of causing assertion error
2015-08-15 14:51:38 -04:00
BlockMen
7238df4c59
Fix sneaking ( fixes #665 and #3045 )
2015-08-15 20:36:45 +02:00
nerzhul
c4b5561b3f
Remove unused function from connection.{cpp,h}
2015-08-15 08:48:20 +02:00
kwolekr
be9024a397
minimap: Add ability to disable from server
2015-08-13 15:05:48 -04:00
est31
a670ecfde4
game.cpp: Update cached settings
2015-08-13 20:05:53 +02:00
Perttu Ahola
def274a583
Fix segfault caused by a8e238ed06ee8285ed4459e9deda3117419837f6
2015-08-13 19:02:48 +03:00
est31
a8e238ed06
Add count based unload limit for mapblocks
2015-08-13 07:56:07 +02:00
kwolekr
2b04ab874d
SAPI: Track last executed mod and include in error messages
2015-08-12 23:56:12 -04:00
est31
738fbc66d0
Fix Lua PcgRandom
...
Before, this lua code led to a crash:
local pcg = PcgRandom(42)
local value = pcg:next()
This was because if you called s32 PcgRandom::range(min, max) with the
minimum and maximum possible values for s32 integers (which the lua
binding code did), u32 PcgRandom::range(bound) got called with 0 as the
bound. The bound however is one above the maximum value, so 0 is a "special"
value to pass to this function. This commit fixes the lua crash by
assigning the RNG's full range to the bound 0, which is also fits to the
"maximum is bound - 1" principle, as (u32)-1 is the maximum value in the
u32 range.
2015-08-12 11:36:22 +02:00
paramat
f0b325254f
Treegen: Rename pine tree mapgen alias
2015-08-10 09:50:58 +01:00
Kahrl
6c0c27f662
Fix intlGUIEditBox leak and uninitialized value in Mapper (reported by valgrind)
2015-08-10 08:41:45 +02:00
kwolekr
1c408c4f1d
Make NetworkPacket respect serialized string size limits
2015-08-10 02:16:55 -04:00
kwolekr
18cfd89a86
Display Lua memory usage at the time of Out-of-Memory error
...
Also misc. minor cleanups
2015-08-10 01:38:09 -04:00
rubenwardy
a953ff4dfc
Fix segfaults caused by the Environment not being initialized yet
2015-08-09 23:36:55 +02:00
Loic Blot
35cc90b086
Remove unused file
2015-08-09 13:27:42 +02:00
Kahrl
63b12f1f04
Fix camera updates being toggled by N key in release mode ( #2762 )
2015-08-07 06:02:06 +02:00
gregorycu
5c3c965c1a
Fix detection of sneaking node
...
This fixes bug 1551
2015-08-06 03:14:56 -04:00
kwolekr
8560ece02e
Fix BufferedPacket race condition ( fixes #2983 )
...
This was caused by the use the non-threadsafe SharedBuffer in a
threaded context.
2015-08-06 02:25:35 -04:00
kwolekr
bd0b469d3d
Fix critical vulnerabilities and bugs with NetworkPacket
2015-08-06 00:10:57 -04:00
est31
49cf66d785
Initialize random for verification key generation too
2015-08-06 05:48:07 +02:00
kwolekr
bcf47bc67c
Improve Script CPP API diagnostics
2015-08-05 21:13:03 -04:00
kwolekr
3183d5a403
connection: Make assertions non-fatal for received data
2015-08-05 21:01:13 -04:00
RealBadAngel
3295f3c401
Fix tiling issues for PLANTLIKE and FIRELIKE with FSAA
2015-08-05 22:52:32 +02:00
paramat
7a6e4dc54a
Cavegen V6: Make all caves consistent with 0.4.12 stable
...
When tunnels entirely above ground were avoided, the
missing pseudorandom calls changed the allowed caves.
Now, above ground tunnels are not placed while
still running all previous pseudorandom calls.
2015-08-03 06:39:23 +01:00
paramat
cf77e0333d
Biome API: Make fallback biome stone and water, disable filler
2015-08-03 02:34:32 +01:00
Břetislav Štec
abe6c072d6
src/util/numeric.{cpp,h}: Fix FacePositionCache data race
2015-08-02 19:42:22 +02:00
Miner59
060e56b24c
Fix "bouncy" blocks
...
Before players "bounced" too high. Now, while still allowing to bounce, higher speed bounces are throttled.
2015-08-02 19:40:23 +02:00
Břetislav Štec
868a1a5c13
src/client/tile.cpp: Fix reference counting
2015-08-02 19:26:15 +02:00
rubenwardy
ec796b8e81
Add map limit config option
2015-08-02 14:27:04 +02:00
Břetislav Štec
a5e5aa5be9
Prepend "Lua: " before lua exceptions
...
src/server.cpp
src/emerge.cpp
2015-08-02 02:17:37 -04:00
Břetislav Štec
c4287a0d68
src/wieldmesh.cpp: Fix mesh extrusion memory leak
2015-08-02 02:16:30 -04:00
Břetislav Štec
ebe7b31538
src/client.cpp: Fix mapper memory leak
2015-08-02 02:15:38 -04:00
kwolekr
42cf5e972d
Improve accuracy and safety of float serialization
...
Multiplying by a factor of 1/1000.f (rather than dividing by 1000.f) directly
introduces an error of 1 ULP. With this patch, an exact comparison of a
floating point literal with the deserialized F1000 form representing it is now
guaranteed to be successful.
In addition, the maxmium and minimum safely representible floating point
numbers are now well-defined as constants.
2015-08-01 19:30:08 -04:00
kwolekr
bf991bde45
Clean up util/serialization.{cpp,h} and add unit tests
2015-08-01 19:24:46 -04:00
Břetislav Štec
67997af67f
src/environment.cpp: Fix NULL pointer dereference
2015-08-01 20:44:18 +02:00
Břetislav Štec
79e2647556
src/network/connection.h: Fix race condition
2015-08-01 20:44:17 +02:00
est31
c39a85a88d
Android: Add githash header to spare rebuilds after new commits
...
Before, android_version.h got changed at every new commit. Now, we
only change it with new minetest releases. Analogous to how cmake
does it, we add an android_version_githash.h file that communicates
the git hash to C++ code.
Also, unify VERS_MAJOR, VERS_MINOR and VERS_PATCH variable
calculation inside the whole makefile.
2015-08-01 20:42:07 +02:00
kwolekr
7919318be7
tests: Log exceptions thrown inside of unit tests
2015-07-31 23:30:25 -04:00
paramat
cfed682d04
Dungeon generation: Fix code style issues in dungeongen.cpp
2015-08-01 00:37:26 +01:00
Loic Blot
05fe9ab2d4
Small SendableMediaAnnouncement cleanup
...
-> Remove the SendableMediaAnnouncement struct
-> Forge the packet directly in the m_media loop, spare one loop and the construction of a vector
-> Use preincrement to spare iterator copies
2015-07-31 01:01:00 +02:00
est31
eb3aac20c8
Android: fix horrible libiconv build
...
Before, our libiconv build was a joke. We first called configure for our own build host system,
then called make, before we executed a Android.mk script we provided as patch. The first "native make"
always failed, and the LIBICONV_LIB file setting in our Makefile didn't match the built one,
resulting in an always-rebuild of iconv.
This commit cleans up this total mess, removes the double-build, and the Android.mk, and properly calls
./configure with the according target platform, and uses a built toolchain.
As we have to deal with the android bug "NDK: Support for prebuild libs with full sonames"
https://code.google.com/p/android/issues/detail?id=55868
as the 2013 patch
https://lists.gnu.org/archive/html/libtool-patches/2013-06/msg00002.html
by Google's David Turner wasn't inside the 2011 libtool, we pass -avoid-version to
libtool.
Thanks to the proper build, wide_to_utf8 works for android now, removing us of the need to disable it.
2015-07-29 15:59:06 +02:00
nerzhul
ca63f7f10d
Precalculate mapblock relative size. This permit to remove many s16 calculs on runtime
2015-07-29 11:45:44 +02:00
Břetislav Štec
88a6b9f52d
Fixed minimap memory leak
2015-07-27 11:06:46 -04:00
est31
f336d3ffb6
Fix srp.cpp:815 leak
...
Thanks @Zeno-
2015-07-27 08:15:39 +02:00
est31
c30a2d6854
Add AreaStore data structure
2015-07-27 06:42:56 +02:00
SmallJoker
454a290370
Fix MSVC number conversion warning
2015-07-25 17:38:04 +02:00
est31
fa1096ec49
Fix minetest.get_(all)_craft_recipe(s) regression
...
Since 03e0dd33a847a83d975282c6caf6b926306e7b57 the calls didn't return an output count
for the recipes.
2015-07-25 17:33:41 +02:00
Loic Blot
4e6971e593
Cleanup server addparticle(spawner) by merge two identical functions.
2015-07-25 12:24:28 +02:00
est31
288302a1f0
Fix documentation of dedicated_server_loop
2015-07-24 23:11:19 +02:00
est31
5bde7798e9
Check output of mpz_set_str and fix leak on error condition
...
Also add static identifier as upstream did
2015-07-24 22:42:54 +02:00
Loic Blot
aab7c83d02
Remove some old dead code. Fix some Clang warnings in SRP (ng->N... will
...
always evaluate to true.
2015-07-24 21:48:02 +02:00
est31
2eb329cc63
Bump protocol to 26
...
This was needed due to the TileDef serialisation changes. Originally it has been planned
to also add utf-8 based chat to 26, but chat changes aren't final yet, so they are done
in one change, after the release, and not two small ones, causing us having to be compliant
to three versions of the packet.
2015-07-24 20:32:26 +02:00
est31
3b50b2766a
Optional reconnect functionality
...
Enable the server to request the client to reconnect.
This can be done with the now extended minetest.request_shutdown([reason], [reconnect]) setting.
2015-07-23 07:38:13 +02:00
RealBadAngel
1e0e85f82e
Fix issues with light of attached CAOs
2015-07-23 04:35:13 +02:00
paramat
d569c91f48
Mgv7: Use density noise + density gradient for mountain terrain
...
Tune and optimise noise parameters
2015-07-21 23:16:14 +01:00
RealBadAngel
60350699c7
Add wielded (and CAOs) shader
2015-07-21 23:56:41 +02:00
est31
254dbe7abd
Clarify docs for auth.cpp method
2015-07-21 18:14:39 +02:00
est31
a57d83b46a
Ask auth handler to create auth when a default password is set
...
-> Fix server crash with protocol >=25 if a default password is set.
-> Remove some useless and possibly confusion causing code for the TOCLIENT_FIRST_SRP packet handler
2015-07-21 18:12:28 +02:00
Loic Blot
fa7fe510d9
Remove profiler.h include where it's not needed. Remove some unreachable and very old code
2015-07-21 08:10:43 +02:00
Elia Argentieri
5ebb4237e2
Added get_player_velocity() method. Fixes #1176
2015-07-20 05:40:44 +02:00
est31
7bbb9b066a
MoveItemSomewhere double bugfix
...
-> Fix bug where MoveSomewhere from an infinite source would fill the destination inventory with copies of itself.
-> Fix bug where MoveSomewhere would needlessly call callbacks.
-> Remove trailing whitespaces
2015-07-19 06:23:41 +02:00
paramat
4046f3e302
Cavegen: Mgv6: No small caves entirely above ground
...
Mgv5/mgv7: Remove 'should make cave hole' feature
Remove ravine code
2015-07-19 02:47:11 +01:00
TeTpaAka
e47f390e0d
Refactor particle code to remove the while loops
...
Replaces while loops with proper getfield calls
2015-07-18 14:54:07 +02:00
TeTpaAka
dd2e08e117
Make acc and vel deprecated in add_particle and search for acceleration and velocity instead
...
The doc and the actual behaviour differed.
2015-07-18 07:57:20 +02:00
TeTpaAka
8d03301138
Fix invisible player when the attached entity is removed
2015-07-18 07:41:43 +02:00
Kahrl
9c76f379ac
Display an access denied message when client detects a server timeout
2015-07-17 12:06:30 +02:00
est31
bf7174f3f9
Server kicks: make messages configurable, cache wstring
2015-07-17 06:37:16 +02:00
nerzhul
f9dbec6edf
Kick players when shutting down server and there is a crash due to a Lua stack exception
2015-07-16 20:27:42 +02:00
RealBadAngel
655fc6010f
Fix relief mapping issues
2015-07-16 15:36:48 +02:00
Kahrl
b30e8d8ec6
Make serialization error message translatable
...
Also don't show "probably running a different version" message in simple singleplayer mode
2015-07-14 19:01:33 +02:00
Loic Blot
8ac0cf500f
connection.cpp: remove unused constructor
2015-07-14 18:33:20 +02:00
kwolekr
515e7028ac
Increase limit of serialized long strings
2015-07-14 03:22:16 -04:00
kwolekr
5006ce8260
Remove raw message output on AOM deserialization failure
...
Improve TOCLIENT_ACTIVE_OBJECT_MESSAGES robustness for handling invalid data
2015-07-13 23:29:29 -04:00
kwolekr
6f07f79c2f
Add more robust error checking to deSerialize*String routines
...
Add serializeHexString()
Clean up util/serialize.cpp
2015-07-13 22:38:01 -04:00
paramat
66ea356e68
Mgv6/treegen: (Re)Add fallback nodes for compatibility with subgames
2015-07-13 19:41:26 +01:00
kwolekr
1a1774a105
Fix damage flash when damage disabled
2015-07-10 15:58:57 -04:00
kwolekr
8eb272cea3
Misc. minor fixes
2015-07-10 15:58:57 -04:00
Loic Blot
e6f0178e83
Little coding style fix on porting.h
2015-07-10 19:04:05 +02:00
est31
cb8978fb1d
Settings: pass name to callbacks by reference
...
Spare some copies.
2015-07-09 08:25:17 +02:00
est31
4ece2b9e32
Update clouds enable_3d_clouds when setting changed
2015-07-09 08:24:51 +02:00
Diego Martinez
13e100e1d8
Windows: Fix some warnings.
2015-07-09 01:52:28 +02:00
paramat
b51738177e
Biome API decorations: 'spawnby' searches a 3D neighbourhood
...
The neighbours checked are the 8 nodes horizontally surrounding the decoration base
and the 8 nodes horizontally surrounding the ground node below the decoration
2015-07-08 22:44:10 +01:00
RealBadAngel
39439cbd3d
Add new leaves style - simple (glasslike drawtype)
2015-07-08 11:20:07 +02:00
est31
b0784ba871
Use UTF-8 instead of narrow
...
Use wide_to_utf8 and utf8_to_wide instead of wide_to_narrow and narrow_to_wide at almost all places.
Only exceptions: test functions for narrow conversion, and chat, which is done in a separate commit.
2015-07-08 10:12:44 +02:00
kwolekr
e234d8b378
Clean-up Minimap code
...
- Fixed race conditions
- Fixed null dereference
- Fixed out-of-bounds array access
- MinimapMapblock is now allocated and added to update queue only when enabled
- Removed dependency on LocalPlayer
- Fixed code style
- Simplified expressions and program logic
- Cleaned minimap object interfaces
2015-07-08 01:50:31 -04:00
paramat
ba15c98e4d
Mgv7: Auto-set lowest mountain generation level
...
Lowest level of base terrain determines mountain generation in mapchunk
Change some positional function arguments from int to s16
2015-07-08 00:49:04 +01:00
est31
d92d376148
Client: better m_proto_ver initialisation
...
Previously, m_proto_ver was set to the serialisation version
inside the legacy init packet.
Now, if the server doesn't send a protocol version (protocols < 25),
we set m_proto_ver to some value < 25 and > 0.
2015-07-07 17:03:26 +02:00
ShadowNinja
a93838707a
Use minetest logging facilities for irrlicht log output
2015-07-05 01:05:24 +02:00
paramat
d786a272c0
Mgv7: Lower base of mountain generation to -112 and define constant
2015-07-04 20:21:19 +01:00
est31
64dc053209
Fix endless loop since grandparent commit
2015-07-04 19:43:46 +02:00
est31
96989e0a6a
Craftdef: Use numbers instead of iterators
...
Use numbers instead of iterators to traverse various vectors.
2015-07-04 16:28:21 +02:00
TeTpaAka
87b9cdab07
Fix missing check for 0 in craft replacements
2015-07-04 14:33:49 +02:00
kwolekr
7b171ea2be
Fix code style from recent commits and add misc. optimizations
2015-07-02 23:14:30 -04:00
RealBadAngel
8a85e5e58d
Shaders fixes and cleanup relief mapping code.
2015-07-02 21:36:45 +02:00
est31
2e44873ac9
Inventory manager style cleanup and further checks
2015-07-01 17:03:02 +02:00
est31
b2160bcecd
Disable mesh cache by default
2015-07-01 13:50:25 +02:00
paramat
c0dafa1c10
Cavegen: Cleanup code. Define constant for MGV7_LAVA_DEPTH
2015-07-01 06:21:13 +01:00
est31
9e3e6dc5ec
Make m_blocks_cache private
...
@RealBadAngel has removed all outside access of the cache.
2015-06-30 21:34:23 +02:00
est31
370a33686a
Defer minimap update when shape changed
2015-06-30 21:14:28 +02:00
est31
842579eb8c
Close keybind settings menu with esc
2015-06-30 21:04:06 +02:00
paramat
91f95fd4df
Biome API: Increase heat and humidity noise spreads to 1000
2015-06-30 07:04:18 +01:00
est31
29dda9f356
Add UpdateThread and use it for minimap and mesh threads
2015-06-29 15:00:19 +02:00
kwolekr
4e28c8d3c8
Fix *BSD build with GNU iconv
2015-06-29 12:32:01 +02:00
rubenwardy
0d65ee878c
Add Lua errors to error dialog
2015-06-29 04:47:35 +02:00
RealBadAngel
0a90fedabc
Bugfix: minimap was updated only with loading new blocks, allow forced updates with changing player pos
2015-06-28 14:45:47 +02:00
RealBadAngel
b160f8dfe7
Minimap update
2015-06-28 12:17:36 +02:00
est31
420125debd
Remove busy polling inside minimap thread
2015-06-27 19:20:25 +02:00
paramat
36163d9653
Mgv5/mgv7 caves: Remove sand found in underground tunnels
...
Add missing check for max_stone_y to mgv5 cavegen
Tunnels now carve through sand below water_level
2015-06-27 03:36:40 +01:00
RealBadAngel
ffd16e3fec
Add minimap feature
2015-06-27 03:42:01 +02:00
est31
3376d2e114
Remove compile warning
...
Thanks @TeTpaAka for pointing this out.
2015-06-25 15:50:31 +02:00
est31
3d43df99f1
Return to ignore
2015-06-24 22:47:41 +02:00
Loic Blot
c6766b275f
Typo fix on previous @est31 commit
2015-06-23 23:17:47 +02:00
est31
3a89e25fe0
Small TOCLIENT_HELLO logging fix
...
Fix grammar error and missing number conversion for version.
Also add deployed protocol to log line.
2015-06-23 21:14:48 +02:00
est31
2c1fd29884
Add MoveSomewhere inventory action
...
Improve shift+click experience
2015-06-23 20:18:41 +02:00
Craig Davison
bc55ef337c
Use actionstream instead of errorstream when failing to emerge player
2015-06-23 19:25:06 +02:00
est31
6f8bdda90e
Fix string conversion error message
2015-06-23 15:04:14 +02:00
TeTpaAka
17ba584fe2
Fix bug when craft input isn't replaced
2015-06-22 19:30:35 +02:00
MirceaKitsune
660fa516bf
Fix some issues with animations, and allow non-looped animations to be defined
2015-06-22 01:53:38 +02:00
paramat
622918d8a8
Mgv7: Edit noise parameters. Fewer octaves, larger spreads.
2015-06-21 04:34:19 +01:00
est31
14f4cd0ef9
Small CAO improvements
...
-> remove the old parent as @kahrl suggested
-> use indices no iterator as @kwolekr suggested
2015-06-20 06:58:07 +02:00
paramat
70da8a940b
Mapgen objects: Enable heatmap and humidmap for all biome api mapgens
2015-06-20 04:16:17 +01:00
figec
d7190df07e
More correct wrap_rows implementation
2015-06-20 03:41:51 +02:00
est31
dd91b3d6fb
Generic CAO cleanups and renames for clarification
...
* Use enum for GENERIC_CMD_*
* Rename m_attachements to attachement_parent_ids (public member and clearer name)
* Rename GENERIC_CMD_SET_ATTACHMENT to GENERIC_CMD_ATTACH_TO
* USHRT_MAX + 1 buffer sizes to prevent overflows as @kahrl suggested
* Remove unneccessary m_id from GenericCAO (shadowing protected superclass member for no reason) as @kahrl suggested
2015-06-20 03:37:30 +02:00
est31
40226e5274
Make attached objects visible in 3rd person view
2015-06-20 02:59:53 +02:00
figec
3b65a6a36c
Fix wrap_rows at inner byte of multibyte sequence
...
Also fix UTF-8 inner byte bounds and make unittest for case this fixes.
2015-06-18 23:39:23 +02:00
paramat
e45ecad3ab
Biome API: Add noise defined biome blend
2015-06-18 07:05:22 +01:00
paramat
2da1503780
Mgv6: Don't create air gap in tundra at y = 48 in custom high terrain
2015-06-18 04:18:15 +01:00
est31
ea1b17b88f
Don't print an error for valid listring[] formspec
2015-06-18 04:25:11 +02:00
est31
43dab2ffc8
Make wrap_rows not wrap inside utf-8 multibyte sequences
...
Also count multibyte sequences as "one" character.
Adds unittest for the bug reporter's case.
Fixes #2796 .
2015-06-17 22:22:15 +02:00
est31
6dcf549ba9
Fail iconv call gracefully
...
No freezing when inbuf_size doesn't decrease over time.
2015-06-17 19:03:58 +02:00
est31
7a90b31b30
GUIFormSpecMenu::OnEvent code style update and small refactor
...
* Make method (more) consistent with current code stlye
* Move index into loop constructor after @rubenwardy's suggestion
* Cache inv_s->getList(s.listname), which removes a possibly bad scenario
of inv_s being null.
* Properly check for validity
2015-06-16 20:33:07 +02:00
est31
c977fbd928
Add list-rings
...
Adds list-rings, a method to implement item sending between inventories via shift-click.
Nice insider feature: a ring consisting of a single inventory list serves as nice clean-up method.
Also adds them to minimal game, and the standard inventory.
Craft output slots are not supported.
2015-06-16 14:51:26 +02:00
Nathaniel Olsen
3ae8b92be6
Remove unneccessary space for tab completion
2015-06-16 07:16:22 +02:00
paramat
38482d2656
Biome API: Enable biome generation to lower world limit
...
Decorations: Remove lower limit of water level for placement
2015-06-15 02:07:38 +01:00
SmallJoker
bb5f830d16
Ignore punches with no damage in the actionstream
2015-06-15 00:10:13 +02:00
est31
ee38bcd307
Automated whitespace error fix for last commit
2015-06-14 23:15:20 +02:00
RealBadAngel
43fcfbfe05
Improved parallax mapping. Generate heightmaps on the fly.
2015-06-14 21:13:36 +02:00
est31
d105bf27dd
Add UTF and other utility unit tests
2015-06-14 12:07:51 +02:00
est31
60f31ad523
Android: bypass broken wide_to_utf8 with wide_to_narrow
...
While utf8_to_wide works well, wide_to_utf8 is quite broken
on android, for some reason.
2015-06-14 08:25:21 +02:00
Ilya Zhuravlev
b6387b4e0f
Use utf-8 in formspecs
2015-06-13 19:49:55 +02:00
est31
572990dcd3
Add utf-8 conversion utilities and re-add intlGUIEditBox
2015-06-13 19:49:55 +02:00
TeTpaAka
aa13baa30a
Add minetest.register_on_player_hpchange
2015-06-13 19:40:31 +02:00
TeTpaAka
e50aa4ed06
Add return list of individual counts to find_node_in_area
2015-06-13 19:39:18 +02:00
est31
502e40a649
dofile error reporting for syntax errors
...
According to doc, dofile() raises an error when parsing failed due to syntax errors.
Fixes #2775
2015-06-12 20:23:31 +02:00
paramat
0b187ede4b
Minimal: Add snow biome and jungleleaves nodes. Add mapgen aliases
...
Treegen: Remove alias checks from jungletree generation for speed
2015-06-12 08:20:19 +01:00
paramat
74d8b341bc
Mgv5/mgv7: Trigger biome recalculation at underwater surfaces
2015-06-03 06:37:10 +01:00
est31
ba3ff5ef39
Fix uninitialized variable error
...
If you run minetest with valgrind, you'll quickly notice uninitialized jump
depend error messages that point to s_base.cpp:131. This commit fixes those.
2015-06-02 13:55:02 +02:00
est31
617a3d426f
Make split method static
2015-06-01 17:04:21 +02:00
est31
06a2eee692
Mapblock: nodecount refactor
...
Spare direct multoplication, use constant MapBlock::nodecount instead of
local nodecount variables.
Also use strides at one place instead of multiplications.
2015-05-31 06:24:41 +02:00
SmallJoker
b4dfaa3a7a
Only retrieve always_fly_fast setting once
2015-05-30 22:29:36 +02:00
Craig Robbins
addf3ee165
(Android) Only simulate holding down fast key if fast_move is toggled to true
2015-05-29 22:59:21 +10:00
kwolekr
522acf920f
Make get_biome_list() error message more helpful
2015-05-28 20:04:50 -04:00
Kahrl
0f15488eae
Fix typo in variable name
2015-05-28 20:47:15 +02:00
TeTpaAka
c0335f7d13
Add some missing getter functions to the lua API
...
ObjectRef:
get_properties
get_armor_groups
get_animation
get_attach
get_bone_position
Players:
get_physics_override
hud_get_hotbar_itemcount
hud_get_hotbar_image
hud_get_hotbar_selected_image
get_sky
get_day_night_ratio
get_local_animation
get_eye_offset
Global:
minetest.get_gen_notify
minetest.get_noiseparams
2015-05-28 16:46:35 +02:00
est31
990a96578f
Consistent const string params
...
Parent commit broke behaviour.
Thanks @TeTpaAka for testing the fix.
2015-05-27 13:23:09 +02:00
est31
21878c9d5c
Spare some string copies
2015-05-27 11:45:40 +02:00
paramat
f16ebbfecf
Mgv6: Enable snowbiomes by default. Double biome noise spread. 3 octaves, 0.5 persistence for humidity
2015-05-26 02:08:06 +01:00
est31
6b7fb591cb
Small clientiface ASCII art improvements
...
Use v arrows except where there is only one line between two boxes,
and other improvements
(Yea could use ↓ but its an ASCII art not an Unicode art).
2015-05-24 16:33:22 +02:00
paramat
774e5d17c4
Biome API, mgv7: Increase heat/humidity spreads. Improve mgv7 noise parameters
2015-05-24 04:33:09 +01:00
paramat
3dba6d1f90
Mgv5/v7: Fix generateBiomes biome recalculation logic Biomegen down to y = -192 for mgv5 deep oceans. Improve code
2015-05-23 02:18:30 +01:00
SmallJoker
39869aaa25
Fix Windows build, clean up included headers
...
Also fix a startup error caused by s_security.cpp
2015-05-22 20:37:59 +02:00
est31
e13d2bafc6
Deny empty username early in the protocol
...
Thanks to @UltimateNate for pointing this out :)
2015-05-22 20:24:39 +02:00
est31
9facb40738
Don't ignore nametag attribute change message for newer versions
...
This allows newer versions to add additional information that isn't
read by us, but still in a backwards compatible manner.
2015-05-21 19:01:46 +02:00
kwolekr
da34a2b33e
Replace instances of std::map<std::string, std::string> with StringMap
...
Also, clean up surrounding code style
Replace by-value parameter passing with const refs when possible
Fix post-increment of iterators
2015-05-19 16:10:49 -04:00
rubenwardy
603297cc35
Add texture overriding
2015-05-19 21:27:07 +02:00
kwolekr
43702ec6ac
Fix build with libstdc++
...
libstdc++ doesn't include <cstring> inside of <string>, unlike libc++.
2015-05-19 02:38:48 -04:00
kwolekr
6c5a6967ec
Split ObjDef/ObjDefManager out to objdef.cpp
2015-05-18 22:30:25 -04:00
est31
497299afd6
Lower log level for unexpected behaviour
...
Its a possible mistake to log in to a server with twice the same name.
Before, it triggered a server wide error message, now it logs to actionstream.
2015-05-19 00:55:58 +02:00
est31
d2ca662569
Enforce hiding nametag
...
Work around irrlicht bug and hide nametag if its alpha is set to 0.
Thanks @TeTpaAka for pointing out workaround.
2015-05-18 23:10:48 +02:00
est31
23984ef7f0
Make nametags white again
...
Commit 11a96e4901ce54c4646e47866f7a66cd9034c16b
commented out version parsing, resulting in the version byte being parsed as part of the color,
making nametags dark grey.
Re-introduces version parsing and ignores the packet if the version is more recent than ours,
fixing the unused variable warning (should have been done anyway).
2015-05-18 21:11:41 +02:00
kwolekr
20aa78cffb
Fix null dereference when loading schematic from definition without a NodeDefManager
2015-05-17 22:32:35 -04:00
kwolekr
46684beec1
Record MapBlock modification reasons as flags instead of strings
...
This improves performance of MapBlock::raiseModified by a factor of 6.
Also, clean up mapblock.h a bit and inline small functions.
2015-05-17 22:14:26 -04:00
kwolekr
4c9a8a91c4
SAPI/Noise: Add PerlinNoiseMap:getMapSlice() function
...
This adds the ability to grab 'slices' of noise calculated by PerlinNoiseMap.
Retrieving smaller slices of noise from the computation result as needed
optimizes memory usage while maintaining a reasonable amount of CPU overhead.
2015-05-17 04:04:17 -04:00
paramat
c0edb8e313
Mapgen v5/v7: Detect sandstone, enable sandstone brick dungeons
2015-05-17 06:07:39 +01:00
kwolekr
3ffb5f5761
Add optional buffer param for bulk data array writes in Lua
2015-05-17 00:07:45 -04:00
kwolekr
28b2476b11
Noise: Fix interpolation at negative coordinates
2015-05-17 00:04:51 -04:00
ShadowNinja
c00b6812b1
Fix current mod name change missed during rebase
2015-05-16 21:12:03 -04:00
kwolekr
11a96e4901
Add -Wsign-compare for Clang builds and fix some signed/unsigned compiler warnings
2015-05-16 20:15:03 -04:00
kwolekr
fb36c471d7
SAPI: Accept either ARGB8 table or ColorString to specify colors
2015-05-16 20:15:03 -04:00
ShadowNinja
8f9af57314
Add core.get_dir_list
2015-05-16 18:33:22 -04:00
ShadowNinja
6c06330daf
Add core.request_insecure_environment()
2015-05-16 18:33:19 -04:00
ShadowNinja
05ab9973f9
Add core.mkdir
2015-05-16 18:32:37 -04:00
ShadowNinja
3a8c788880
Add mod security
...
Due to compatibility concerns, this is temporarily disabled.
2015-05-16 18:32:31 -04:00
est31
c297a75a7d
Fix build since last commit
...
Also rename method to better match what it does.
2015-05-16 22:14:15 +02:00
est31
8dbf683313
Finalize init packets and enable protocol v25
...
This enables srp.
2015-05-16 21:17:28 +02:00
TeTpaAka
19cbb6b37b
Add push_ARGB8 to script/common/c_converter
2015-05-15 16:21:56 -04:00
TeTpaAka
18c2f16c13
Generalize core.get/set_nametag_color into core.get/set_nametag_attributes
2015-05-15 16:21:01 -04:00
kwolekr
5d1d7c17ea
Noise: Make buffer size parameters unsigned
2015-05-15 16:20:30 -04:00
kwolekr
eaef678e0b
Schematics: Fix probability values for .mts version 1
2015-05-15 16:20:30 -04:00
Brandon
c5b4e54174
Add minetest.register_on_punchplayer
2015-05-15 11:09:55 +02:00
TeTpaAka
86a963caca
Add get and set functions for the nametag color
2015-05-15 11:03:27 +02:00
Craig Robbins
99cf53c908
ANDROID: Do not limit situations where fast is enabled
...
Before this commit autofast for Android was ignored if the user was sneaking, digging or building. There is no reason for this and it impedes movement control
2015-05-15 13:22:07 +10:00
est31
b70e67df8c
Fix compiler warning about sign comparison
2015-05-13 00:04:30 +02:00
SmallJoker
ecc514f11b
Build and link gmp correctly on MSVC
...
Also optimize json's library
2015-05-12 21:07:46 +02:00
est31
b4c3ff6eab
is_player() is no player-only function
2015-05-12 05:52:49 +02:00
paramat
02805af36e
Mapgen v5/6/7: Cleanup node resolver and aliases
2015-05-12 04:40:53 +01:00
est31
82e35edff5
Make early protocol auth mechanism generic, and add SRP
...
Adds everything needed for SRP (and everything works too),
but still deactivated, as protocol v25 init packets aren't final yet.
Can be activated by changing the LATEST_PROTOCOL_VERSION header to 25
inside networkprotocol.h.
2015-05-11 18:40:27 +02:00
est31
181f7baa45
Add LibGMP
...
Uses system provided libgmp if found, if not it falls back to mini-gmp.
2015-05-11 17:48:33 +02:00
Craig Robbins
5a1975a4e3
Change lower limit of display_gamma to 1.0 (linear light)
...
Now matches function comment
2015-05-11 02:03:09 +10:00
kwolekr
2b99d904f6
Schematics: Add per-node force placement option
2015-05-09 18:44:00 -04:00
kwolekr
d59e6ad004
Fix typo in WieldMesh::setItem()
2015-05-08 23:30:56 -04:00
kwolekr
ff740a4179
Ensure that Map::findNodesWithMetadata() reports nodes strictly within the node-granular area
2015-05-08 13:31:03 -04:00
kwolekr
f1ccfd3c3d
Replace Wieldmesh::setItem assertion that could be triggered by the server with an error
2015-05-08 13:26:31 -04:00
est31
0310123bc9
Fix release build warning
2015-05-08 07:23:41 +02:00
kwolekr
f091bbd563
Fix compilation for non-client builds, and fix signed comparison warning
2015-05-08 01:21:34 -04:00
kwolekr
2dba29ebf2
Tests: Add schematic unittests
...
Improve schematic file-saving interface
Add ability to create temporary test files
2015-05-08 00:55:42 -04:00
est31
33c11415bf
Gracefully handle PacketErrors
2015-05-08 06:51:03 +02:00
kwolekr
0e64fc45b9
Fix missing Y component assignment in check_v3f
2015-05-08 00:03:41 -04:00
Kevin Ott
e17c6ba2cd
Remove duplicate lua_getfield() in c_converter.cpp
...
Fixes #2678
2015-05-07 09:57:34 +02:00
kwolekr
b246812455
Schematics: Add indent-with-space option for schematic Lua table serialization
2015-05-07 02:54:35 -04:00
kwolekr
656575b59d
NodeResolver: Remove NodeResolveMethod
...
This simplifies NodeResolver logic and makes some interfaces cleaner.
2015-05-07 02:36:01 -04:00
ShadowNinja
d720fd5644
Fix connection speed unit names
2015-05-06 15:41:37 -04:00
ShadowNinja
3a8e7341ec
Fix error messages for type-checking Lua reading functions
2015-05-06 15:33:36 -04:00
ShadowNinja
3f5c2dea4d
Improve Redis error messages
2015-05-06 15:28:22 -04:00
kwolekr
2b44e75442
Fix build on Debian broken by b45df9d (missing include, somehow?)
2015-05-05 20:40:18 -04:00
kwolekr
633af58a05
NodeDefManager: Improve const-correctness of interfaces
...
- Add ability to explicitly reset NodeResolve state (useful for unittesting)
- Remove non-essential NodeResolve methods modifying state from INodeDefManager
- Add const qualifier to NodeDefManager and ContentFeatures serialize
2015-05-05 16:52:06 -04:00
kwolekr
b785577f03
Add core.find_nodes_with_meta() script API
2015-05-05 16:21:59 -04:00
kwolekr
b45df9d6a7
Tests: Add NodeResolver unittests
...
Minor misc. NodeResolver cleanups
Prefix faux content type constants for testing with t_ to avoid
confusion or name collisions
2015-05-05 12:00:36 -04:00
ShadowNinja
1be2d32fd5
Make Git version detection use VERSION_STRING instead of tags
...
This fixes the problem where 0.4.12-dev versions were erroneously shown as
0.4.11-dev because the tag was added on a separate branch. It also fixes a
similar issue when builders didn't fetch new tags when updating.
This also removes the number-of-commits-since-tag field, since it's
incompatible with this. Said field doesn't seem to be useful anyway if you
have the commit hash.
2015-05-05 17:13:05 +02:00
ShadowNinja
dfd790930c
Fix GCC compiler warning
2015-05-04 20:01:10 -04:00
Jay Arndt
2923eafaca
Stop NetworkPacket methods from producing bloated packets
2015-05-05 01:47:41 +02:00
est31
4b0f5fcbf5
Cache enable_3d_clouds flag
...
Small improvement on clouds rendering performance
2015-05-04 22:50:04 +02:00
paramat
9345ba7b6a
Clouds: Make cloud area radius settable in .conf
2015-05-04 22:41:13 +02:00
Kevin Ott
5fa4fed097
Add a check for animation when getting an extruded mesh
...
Fixes issue #2667
2015-05-04 02:11:36 -04:00
obneq
9af7f38e3f
Fix pathfinder to produce more useful paths
...
- Fix unintended negation of condition
- Remove line_of_sight 'optimization'
2015-05-03 22:36:11 -04:00
kwolekr
8f38f8255c
Tests: Add ObjDef unittests
2015-05-03 22:19:35 -04:00
kwolekr
5b237b4d94
ObjDefManager: Set replacement object's handle info after calling set()
...
Make gamedef optional when constructing an ObjDefManager
Add note about object ownership
2015-05-03 22:19:35 -04:00
paramat
9e1e4b6284
RotateAlongYAxis: For facedir case, return if param2 >= 4
2015-05-03 03:43:51 +01:00
SmallJoker
6626a3f72f
Fix several MSVC issues numeric.h
...
-> Round negative numbers correctly CMakeLists.txt
-> Link Json with the static run-time library
2015-05-01 07:34:51 +02:00
kwolekr
37ca3212ee
Fix MSVC compatibility
...
Make sure to include random unittests in android builds, too
Use SWAP() macro
Ensure that negative ranges are tested as well in random unittests
2015-04-29 13:20:01 -04:00
kwolekr
b6475f5448
Tests: Add random unittests
2015-04-29 04:08:04 -04:00
sfan5
4ea5a96fff
Revert the upper-case PROJECT_NAME nonsense that was part of #2402
2015-04-27 16:24:49 +02:00
sfan5
558d715bf6
Revert "Only lowercase project name at compile time"
...
This reverts commit 3be9787e64362b8a5020746220c65abbe31f8097.
2015-04-27 16:24:49 +02:00
kwolekr
415167b228
Noise: Fix PcgRandom::randNormalDist() when range contains negative numbers
...
This fixes an issue with erroneous float-to-int rounding that resulted in
truncation toward 0, causing a biased distribution.
2015-04-27 04:05:25 -04:00
kwolekr
cd1d625ab2
Replace PRNG assertions with PrngException
2015-04-27 01:24:37 -04:00
est31
27e3a353d8
Remove craftdef serialisation
...
It isn't needed anymore, sending ICraftDefManager over the network has been obsoleted
by protocol version 7.
2015-04-26 21:30:52 +02:00
est31
4f851faa91
Craftdef refactor
...
Fix style, refactor assert, use '"' instead of "\"",
replace code duplicating craftGetItemName, rename iterators.
2015-04-26 21:28:40 +02:00
kwolekr
7220ca906d
Tests: Modularize unit testing
...
Split unit tests into separate files under src/unittest/
Give better unittest diagnostics
Clean up some code
2015-04-26 15:08:54 -04:00
Aaron Suen
1fb3d1156c
Fix fast leaves with texture_clean_transparent enabled.
2015-04-26 23:39:40 +10:00
Kevin Ott
400c6087b6
Fix player pitch and yaw not being set properly
2015-04-26 23:36:05 +10:00
nerzhul
ab04b7fe94
Remove unused variable Client::m_active_blocks
2015-04-24 15:41:45 +02:00
paramat
ac6efa2539
DecoSchematic: Fix missing trees in rough terrain
...
Move place_on check to before place_center_x/y/z displacement of p
Reduce displacement of p by place_center_x/y/z flags
to correctly position schematics
2015-04-23 02:44:25 +01:00
est31
ccc09abc2d
Protocol 25: wstring -> string for custom access denial reasons
...
Also fix std::logic_error when server::DenyAccess() is used with only two arguments.
2015-04-22 14:10:39 +02:00
nerzhul
eec01bc2fa
Re-apply 972d17baea81ffe6d508b291ef97207a4822e1da...
...
but not rename the container. Approved-By est31
2015-04-22 11:47:22 +02:00
SmallJoker
17a173f474
Fix crash on startup (Windows)
2015-04-22 13:48:10 +10:00
ShadowNinja
3be9787e64
Only lowercase project name at compile time
2015-04-21 20:51:16 -04:00
kwolekr
e0eec201a1
Revert "m_active_object_messages is used like a queue. Use std::queue instead of std::list. Also rename to m_active_object_messages_queue"
...
This reverts commit 972d17baea81ffe6d508b291ef97207a4822e1da.
The commit being reverted was unauthorized. There had been no discussion,
review, or sign-off prior to submittal to upstream.
2015-04-21 18:12:01 -04:00
Loic Blot
972d17baea
m_active_object_messages is used like a queue. Use std::queue instead of std::list. Also rename to m_active_object_messages_queue
2015-04-21 23:28:13 +02:00
kwolekr
943c6e523e
Noise: Add noise unittests
...
Fix buffer size calculation for lacunarity < 1.0
Add guard against absurd noise parameters
2015-04-21 13:05:14 -04:00
ShadowNinja
c197e03922
Fix sign-compare compiler warnings in mg_ore.cpp
2015-04-20 22:57:30 -04:00
ShadowNinja
d36067fda5
Fix mod store rating
2015-04-20 22:48:14 -04:00
kwolekr
46a2c1f167
Ore: Add biomes parameter
2015-04-20 20:25:33 -04:00
kwolekr
a443a13a9d
Fix build on OS X (Thanks neoascetic)
2015-04-20 01:35:41 -04:00
kwolekr
3d4244cc75
Add 'persistence' alias for Lua noiseparams and validate more vector parameters
2015-04-19 21:42:40 -04:00
kwolekr
687d969c9c
Noise: Correct noise objects created with invalid dimensions
2015-04-19 21:39:10 -04:00
kwolekr
386d695330
Porting: Refactor initalizePaths()
...
Add support for Solaris and HP-UX
Search additional potential procfs locations for current executable
2015-04-19 16:52:58 -04:00
est31
f1a41e4f77
Disable connection timeout for singleplayer and server tabs
...
In worlds with many mods we can easily reach timeout, waiting for the server to start.
2015-04-19 19:58:21 +02:00
paramat
a615da6b12
Biome API: Add biome-specific river water
2015-04-19 06:09:57 +01:00
obneq
0c792db05c
fix infinite spawners
2015-04-18 20:14:34 +02:00
kwolekr
e0889c6c03
Schematics: Fix core.schematic_create()
2015-04-17 18:39:37 -04:00
SmallJoker
5f0b36b8b7
10s timeout when connecting to server
2015-04-17 10:40:48 +02:00
est31
d4d561fbcd
Fix build since: "Remove referenced schematics from Decorations on clear"
...
Fixes build, which has been broken for all platforms (except BSD?) since
grandparent 406d9ba87b9f6e57b86c6282bf157e3341aa195c.
Thanks to @SmallJoker for pointing out a solution.
2015-04-17 10:30:59 +02:00
kwolekr
3576f4fab7
Switch to check_v3s16 in l_mapgen.cpp and l_vmanip.cpp for type safety
2015-04-17 01:03:13 -04:00
kwolekr
406d9ba87b
Schematics: Remove referenced schematics from Decorations on clear
2015-04-17 00:53:05 -04:00
est31
f0a1379e5a
Refactor around translatePassword
...
Change types for passed password from wstring to string, which removes converting
back and forth in most cases. Move the narrow_to_wide conversion, where its neccessary,
closer to irrlicht. Remove trailing spaces in guiPasswordChange.cpp. Make parameters for
translatePassword passed as const reference.
2015-04-17 06:10:30 +02:00
kwolekr
821d0025da
Biomes: Remove referenced biomes from Decorations on clear
2015-04-16 23:38:05 -04:00
est31
4abb96fb54
Fix path detection with --std= parameter
...
Fixes path detection when compilers have been told to follow a standard, e.g. with -DCMAKE_CXX_FLAGS=--std=c++98.
To see the passed defines, try this with and without the --std parameter:
gcc -E -dM --std=c99 - < /dev/null | grep linux
2015-04-17 05:12:06 +02:00
est31
b318c4712c
Fix build for < C++11 since last commit
...
Build broke since last commit 479f38973e13680d6a39d9c2a7f29fd330b67d41 for compilers not supporting C++11.
Pre C++11, the constructor of std::ifstream only allows C like strings.
2015-04-17 02:34:02 +02:00
kwolekr
479f38973e
Schematics: Refactor NodeResolver and add NodeResolveMethod
...
NodeResolver name lists now belong to the NodeResolver object instead of
the associated NodeDefManager. In addition to minimizing unnecessary
abstraction and overhead, this move permits NodeResolvers to look up nodes
that they had previously set pending for resolution. So far, this
functionality has been used in the case of schematics for
serialization/deserialization.
2015-04-16 16:27:05 -04:00
Loic Blot
0c634a9719
Use std::vector instead of std::set for Environment::getObjectsInsideRadius
...
We are only iterating sequentially, we don't need a set here
Also use a vector reference instead of a copy
2015-04-16 18:37:29 +02:00
paramat
d02300a749
Mgv5: Fix above/below ground spawn when water level is altered
2015-04-16 06:36:57 +01:00
paramat
ad789be45b
Mgv5/v7: Add check for water for deciding biome node stability
2015-04-16 04:01:58 +01:00
paramat
a09e4427d6
Defaultsettings: Add dungeons and jungles flags. Update conf.example
2015-04-14 02:04:57 +01:00
kwolekr
b2a89c04b2
Schematics: Reorganize (de)serialization and add Lua serialization API
2015-04-13 03:10:52 -04:00
paramat
a5f942c3c0
Mgv6: Fix taiga, allow pine tree spawning on snowblocks
2015-04-12 05:52:41 +01:00
paramat
75cbd80e5b
Mgv6: Add optional snow biomes
2015-04-12 04:27:26 +01:00
Ner'zhul
ce8a9ed94b
Fix a rare crash case un SendPlayerHP
...
If the player is disconnected while Lua API is doing a l_punch call, for example, the playersao is NULL and the server crash. Fix it.
2015-04-11 10:07:23 +02:00
est31
0a413265cb
Document for api functions that rely on current_modname, that it doesn't work when not loading mods
2015-04-08 23:05:26 +02:00
kwolekr
c758fd73ff
Link against shlwapi.lib and unify linker input sources for Windows
2015-04-08 12:56:53 -04:00
Dmitry Marakasov
d2fc98e4a6
Fix freetype detection
...
Don't reinvent freetype detection, use working one from cmake.
2015-04-08 00:37:27 -04:00
kwolekr
0df736173e
Schematics: Prepend mod path to relative schematic filepaths
2015-04-08 00:28:56 -04:00
Loic Blot
5132908f4b
TOCLIENT_ACTIVE_OBJECT_MESSAGES: channel must be 1 for unreliable message
2015-04-07 14:28:36 +02:00
ShadowNinja
3c6e112c28
Fix missing SQLite3 statement pointer initialization
...
This fixes a segfault when the database is shut down
before it finishes connecting and setting up.
2015-04-07 00:31:41 -04:00
paramat
392ac41c99
Cavegen: Remove now unnecessary checks for water, lava, ice
...
Remove large cave checks for air
Mgv5/mgv7:Add is_ground_content checks to 3d noise tunnels
More large caves
Shorten lines
2015-04-07 04:43:24 +01:00
est31
f81759792e
Make comments consistent with TOSERVER_INIT -> TOSERVER_INIT_LEGACY rename
2015-04-07 00:15:15 +02:00
Craig Robbins
43aab618e5
Change screenshot filename to one likely to work on all modern filesystems
...
Fixes #2603
2015-04-06 11:07:51 +10:00
Loic Blot
8804c47e59
TOCLIENT_ACTIVE_OBJECT_REMOVE_ADD can be unreliable, catch PacketError exception.
...
Also set the packet size at creation not when pushing rawString, no functional change
2015-04-05 11:39:38 +02:00
Loic Blot
ed3ebd633d
craftdef.cpp: Return 0 after assert to make Clang happy
2015-04-05 11:16:12 +02:00
Loic Blot
4235f671c1
Fix uninitialized variabled in ConnectionEvent
2015-04-05 11:13:30 +02:00
est31
334e70455b
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
1cb404522f
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
470de10de3
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
aa340fd857
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
92f20696eb
Fix crash caused by null texture in GUI formspec/HUD.
2015-04-02 23:56:46 +10:00
SmallJoker
58d62ad045
Fix MSVC error caused by ed10005
2015-04-02 22:56:36 +10:00
paramat
74eb14cc80
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
9527984dbc
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
113bdd3ec0
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
ddf96c7a17
Fix some minor details from 6d61375
2015-04-01 00:19:10 -04:00
Aaron Suen
6d61375cc7
Clean scaling pre-filter for formspec/HUD.
2015-04-01 00:01:05 -04:00
kwolekr
b4247dff2e
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
699e066bea
Fix set_bits
2015-03-31 23:30:44 -04:00
kwolekr
337e79c656
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
d1d5618bb8
Fix use of unitialized variable in gettext.cpp
...
#2583
2015-03-31 21:26:34 +10:00
Loic Blot
1fe4256462
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
ab77bf98ee
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
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
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 c09d026f0561ee3c6db821a7e193716f724a0e4a.
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 4a6582c13c36cab457b78f32338c6bb4ab9ea58b broken since 146f77fdb750833c649de7159a0833c398e14a4d
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 d25ff8fd2592f457b91e8a61240694af3902d23f.
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 800d19270250bb13cc6b2d330199815bf8e96446.
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 a555e2d9b0ccee452996381a44677b8bec210036.
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
ShadowNinja
a9f81b729b
Send real port to server list
2015-01-23 21:38:34 +10:00
paramat
1702c34b64
Mgv7 generateRidgeTerrain: Make river generation relative to water level
...
Remove widthn and make nridge zero underwater
2015-01-22 02:21:11 -05:00
paramat
70354ac20b
Mgv7: Speed optimise calculateNoise and generateRidgeTerrain
...
Remove unnecessary range limiting of persistmap
Skip calculation of filler, mountain, ridge, heat and humidity perlinmaps in underground mapchunks
Skip generateRidgeTerrain in underground mapchunks
2015-01-22 02:10:07 -05:00
paramat
408d9b72f0
Mgv7 generateRidgeTerrain: Enable rangelim of widthn to remove abysses, calculate widthn later in function
...
Reduce width to 0.2
Carve river channels in deeper waters
2015-01-22 02:06:33 -05:00
TriBlade9
db481e7232
Added ratio argument to colorize, removed the weird alpha-based ratio.
2015-01-20 22:56:20 +10:00
paramat
9b89f7aad7
Mapgen V5: Various improvements
...
Caves check for biome nodes, only excavate stone under water level
Unease caves noises, use MT0.3 parameters
Blobgen after cavegen
Biomegen: remove 'is replaceable content' bool
2015-01-18 23:38:15 -05:00
kwolekr
38bd9e93a2
Fix all warnings and remove -Wno-unused-but-set cflag
2015-01-18 23:29:19 -05:00
kwolekr
e36681101e
Add SemiDebug (-O1 with debug symbols) build mode and do not optimize Debug at all
...
Add -Wall to Debug modes for all compilers and -Wabi for non-MSVC
Use /Ox for MSVC Release mode (potentially higher optimization than /O2)
2015-01-18 22:30:11 -05:00
kwolekr
976d0b2caa
Reorganize supported video driver query mechanisms
2015-01-18 13:24:25 -05:00
kwolekr
6e9f287844
Revert "Fix bug in debug build"
...
This reverts commit 839c4a99cddcacdc19dee42286b7029c4c1e7800.
2015-01-18 13:19:28 -05:00
Craig Robbins
839c4a99cd
Fix bug in debug build
...
-O1 results in executables that are completely useless for actuall debugging
2015-01-19 00:26:59 +10:00
Kahrl
e80a044818
Fix use of uninit data in Sky and (potentially) GUIChatConsole constructors
...
Clean up nearby code a bit
As a small side effect, it is now possible to add a background texture
to the chat console by simply providing background_chat.jpg, it is no
longer necessary to also add "console_color =" to minetest.conf.
2015-01-18 13:16:01 +01:00
Craig Robbins
29514918f8
Fix particles causing unitialised data being used due to use of incorrect union member
2015-01-18 20:30:57 +10:00
gregorycu
db3466dbe8
Water fixes
...
Change must_reflow to a deque
Add overload for MapBlock::raiseModified that takes a const char*. This is a speed improvement.
Comment out unused variable
Optimisations to block offset calculations
2015-01-18 20:30:33 +10:00
Craig Robbins
805c8e51e5
Create empty default constructor for MapNode
2015-01-18 13:39:50 +10:00
paramat
2f0a8f1c3e
Mgv7: Replace small pseudorandom caves with 3D noise tunnels. Fewer large caves
2015-01-17 21:57:48 -05:00
sapier
a39c136e69
Fix NodeMetadataList loosing memory on deserialize due to invalid clear map call instead of clear
2015-01-17 19:14:36 +01:00
gregorycu
2959d6b3da
Fix entitiy WieldMeshSceneNode not freed due to additional grab
2015-01-17 19:13:08 +01:00
Craig Robbins
5481e38d0b
Make minor style change(unescape_string())
2015-01-16 21:05:44 +10:00
Loic Blot
e5b636712c
Fix missing return in Database_Dummy::deleteBlock
2015-01-16 21:00:11 +10:00
Craig Robbins
5e58a95491
Fix potential out-of-bounds array index
2015-01-16 14:35:57 +10:00
kwolekr
9736548720
Add ability to delete MapBlocks from map
...
Also add a Lua API and chatcommand for this
2015-01-15 16:48:56 -05:00
kwolekr
0330cec7ec
Initialize noise ptr on creation (fixes crash if OreVein deleted before use)
2015-01-15 16:23:04 -05:00
ShadowNinja
77e20a0c21
Fix unescape_string removing all backslashes
2015-01-15 16:16:41 -05:00
unknown
bd0d786590
Change UniqueQueue to use a queue and a set.
2015-01-15 21:08:35 +10:00
TriBlade9
e19dab2622
Added configurable ambient_occlusion_gamma. Default is 2.2 (same as previous hardcoded values).
2015-01-14 23:35:50 +10:00
Craig Robbins
57f2fa57cd
Fix use of uninitialized data
2015-01-14 15:43:33 +10:00
onkrot
0fd1ee0380
Performance fixes.
2015-01-13 23:48:56 +10:00
unknown
5d08ada224
Add VoxelArea::hasEmptyExtent
2015-01-13 23:24:32 +10:00
kwolekr
714a4f8507
Attempt to fix occasional issue of uninitialized MapBlock data
2015-01-12 22:31:08 -05:00
kwolekr
b0efb8f3b2
Prevent transform of noise3d result in getBlockSeed2
2015-01-12 15:46:04 -05:00
paramat
c367f7301a
Mapgen V5: Move cave generation from base terrain loop to optional function
...
This fixes biome surface in tunnels
2015-01-11 22:35:36 -05:00
sapier
aed70cb0b6
Disable sound and key binding settings in "pause" menu on android
2015-01-11 13:58:49 +01:00
sapier
2d9b311e7b
Fix invalid stepheight increase calculation on android
2015-01-11 13:57:26 +01:00
sapier
25235a4324
Increase stepheight on android by 0.5 to smoothen movement
2015-01-11 04:33:42 +01:00
Kahrl
b7c0e4b333
Fix clipping rectangle of GUITable row highlight
2015-01-10 19:56:14 +01:00
sfan5
3b16103ca6
Change default font sizes to 14(freetype) and 10(non-freetype)
2015-01-10 18:59:43 +01:00
sfan5
8089d89a51
Set default value for ENABLE_REDIS to 0
2015-01-10 15:28:25 +01:00
sapier
30334b6b22
Revert "Switch default scaling factor to 0.75 as most ppl seem to have 96dpi screens instead of previous assumed 72"
...
which ain't required any longer as fonts are no longer autoadjusted
This reverts commit 7ad17a25f4dfc81427df54d5c855b40b4472d517.
2015-01-09 19:07:55 +01:00
sapier
de3888ca09
Remove automatic consistent formspec size <-> font size (now has to be done manually)
...
Set builtin formspecs to autoscale in order to get consistent formspec look and feel
Uncouple label positioning from font size (May break some formspecs but is required to allow manual font adjustment)
2015-01-09 18:46:24 +01:00
Craig Robbins
3c8e372119
Removed superfluous facedir check in mapblock_mesh.cpp
2015-01-10 02:06:33 +10:00
Kahrl
2ab97a7821
Fix logic of checkbox formspec element validity checking
2015-01-09 16:57:54 +01:00
sapier
63867b1a37
Fix memory leaks due to messed up memory handling for particles as well as their spawners
2015-01-09 15:23:49 +01:00
sapier
e201620ee1
Split gui_scaling to gui_scaling + hud_scaling as those elements need different handling on some devices
2015-01-09 14:31:33 +01:00
Craig Robbins
d576235409
Fix facedir > 23 causes segfault in client
...
See issue #2017
Applied kahrl's gist
2015-01-09 15:42:03 +10:00
sapier
7ad17a25f4
Switch default scaling factor to 0.75 as most ppl seem to have 96dpi screens instead of previous assumed 72
2015-01-09 00:37:02 +01:00
ShadowNinja
a3db918f78
Remove included SQLite3
2015-01-08 16:34:42 -05:00
sfan5
d8cf64a202
Add SQLite3 libraries to buildbot
2015-01-08 16:34:42 -05:00
paramat
56a89fd265
Return step smoothing value to 23
2015-01-08 15:06:28 +10:00
kwolekr
4a57ef12a1
Mapgen V6: Re-enable liquid flowing
2015-01-07 19:27:09 -05:00
rubenwardy
2504da28af
Fix direction property of HUD
2015-01-07 20:51:47 +01:00
sapier
ef140eb7b0
Fix emerge thread not cleaning up emerge queue on shutdown
2015-01-07 12:19:48 +01:00
sapier
42f3515c0e
Fix andorid build error
2015-01-07 00:10:21 +01:00
sapier
0f1d33933d
Implement X11 dpi autodetection
2015-01-06 22:41:07 +01:00
sapier
083d19b3fc
Fixes for android
...
Copy only minetest_game to apk by default
Don't copy .git and .svn folders to apk
Fix bouncing asset copy scrollbar due to long filepaths
Reenable font scaling to fix broken menu on high dpi screens
Implement minetest loglevel to android loglevel mapping
Disable touch digging while moving around
2015-01-06 16:13:39 +01:00
Craig Robbins
beb6b3e593
Prevent client crashing if an NDT_AIRLIKE node is dropped
...
The player dropping the node can either be themselves or another player (i.e. without this fix you can crash other people's clients)
Thanks CWz for reporting the issue
2015-01-05 22:55:02 +10:00
kwolekr
2d849b0a19
Shorten ManualMapVoxelManipulator to MMVManip
2015-01-05 02:42:27 -05:00
kwolekr
7289d61e99
Optionally specify propagateSunlight area in calcLighting
...
This fixes the Mapgen V5 calcLighting segfault
2015-01-05 01:20:36 -05:00
kwolekr
3bdf3df223
Exclude vertical mapblock borders when setting light
2015-01-04 23:14:16 -05:00
kwolekr
091594e26e
NodeDef: Clear NodeResolver related entries too in clear()
2015-01-04 22:39:57 -05:00
kwolekr
bdcf03ae36
Add minetest.generate_ores() and minetest.generate_decorations()
2015-01-04 22:38:48 -05:00
kwolekr
cd4d213ae0
NodeResolver: Perform callback immediately if node registration phase finished
...
Also add NodeResolver callbacks on the client
2015-01-04 16:32:31 -05:00
kwolekr
6fdb32361a
Remove freezemelt (the remainder of proller nonsense)
2015-01-04 03:30:10 -05:00
kwolekr
8eb9cebdd0
Add warning about using deprecated fields in Mapgen API and update docs
2015-01-04 03:24:40 -05:00
kwolekr
ef8ed5d127
LuaVoxelManip: Error when given out-of-bounds area
2015-01-04 03:07:28 -05:00
kwolekr
7233a1228e
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
Kahrl
060ae29eaf
Update bundled SQLite to 3.8.7.4
2015-01-04 05:21:59 +01:00
ShadowNinja
3c3887bb19
Deduplicate code and use stdlib in string functions
2015-01-03 14:50:16 -05:00
kwolekr
d91559b8f0
Fix crash if NodeResolver destroyed before pending any node resolutions
2015-01-03 11:05:31 -05:00
sapier
0db73bd83e
More consistent progress bar from 0-100 on startup
2015-01-02 17:53:42 +01:00
sapier
aaec558f85
Fix rounding error in font size making main menu and in game font sizes inconsistent
2015-01-02 16:52:02 +01:00
paramat
7452d5399b
MgV5/6/7: Generate dungeons above water level
...
Use/add stone_surface_max_y to speed-optimise/guide dungeon generation
MgV7: Don't let mountain terrain chop dungeons at mapchunk borders
Make mountain terrain update stone_surface_max_y for caves in mountains
2015-01-01 15:44:26 -05:00
paramat
938a3f2976
Mgv7: Remove range limits on mountain height to enable modification through .conf
2015-01-01 12:51:49 -05:00
kwolekr
a3d7203be5
Fix map parameter load order
2014-12-30 12:30:42 -05:00
Craig Robbins
3d29be24e0
Add display_gamma option for client
2014-12-31 02:44:31 +10:00
Dmitry Marakasov
2414580754
Fix endian.h include for FreeBSD
2014-12-30 23:00:01 +10:00
Craig Robbins
53bc56dc3c
Cleanup updateCameraDirection and fix random input not working
2014-12-30 22:59:55 +10:00
kwolekr
9b0d77a549
Replace instances of height_min/height_max with y_min/y_max to remove ambiguity
2014-12-30 01:48:20 -05:00
kwolekr
b589353d89
Decoration: Fix default parameter values
2014-12-30 00:52:40 -05:00
kwolekr
c6df2bc42c
Add support back for resolving group names in NodeResolver
2014-12-29 23:15:53 -05:00
kwolekr
f12118c38b
Fix some lingering code style issues
2014-12-29 22:04:47 -05:00