| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
| |
* [CSM] Add event on_place_node API lua
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Despite the split of TileSpec into TileDef and TileLayer, the
TileLayer struct is still 66 bytes large, and doesn't fit in
a single cacheline.
I'm moving the color member to cacheline 2, in the hope that it
is less used and the compiler loads all the hot members in a single
cacheline instead. Only color sits now in cacheline 2, all the
other members are in cacheline 1.
Note: is_color is probably rarely set, most nodes will likely
not use hardware coloring, but this may change in the future.
Ideally, this class is shrunk to 64 bytes.
|
|
|
|
| |
* [CSM] add screenshot api lua
|
|
|
|
|
|
| |
This increases size of the getTime return values to 64 bits.
It also removes the TimeGetter classes since the getTime functions
are now very precise.
|
|
|
|
| |
Torches are dug instantly again.
When the digging time is 0, a delay of 0.15 seconds is added between digging nodes. If the left mouse button is released, the delay is set to 0, thus click-digging.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We introduce a new value for "waving" - 2:
0 - waving disabled
1 - wave like a plant
2 - wave like a leave
Plantlike nodes will only allow waving = 1, but for leaves we will
permit both 1 and 2 since current minetest_game sets it to 1 for
all leaves. This makes it somewhat backwards compatible.
For mesh and nodebox, values 1 and 2 are both valid, and the node
can wave in both fashions as desired.
I've tested this with the crops:corn plants, which are mesh nodes,
and the results are really good. The code change is trivial as
well, so I've opted to document the waving parameter in lua_api.txt
because it was missing from there.
Nodeboxes likely will not wave properly unless waving = 2. However
it's possible that waving=1 may be desired by some mod developers
for geometries I have not tried, so the code will not prohibit
either value for mesh and nodebox drawtypes.
Add lua_api.txt documentation for this feature and document both
the existing functionality and the expansion to mesh and nodebox
drawtypes.
|
| |
|
| |
|
| |
|
|
|
|
| |
Client: Don't send `TOSERVER_RECEIVED_MEDIA` since it's not used anymore
Server: Handle `TOSERVER_RECEIVED_MEDIA` using `Server::handleCommand_Deprecated`
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Remove redundant view_bobbing setting
Also fixes bug where disabling view_bobbing disables footstep sounds.
* Removes redundant view_bobbing setting
Setting view_bobbing amount to 0 is now the only way to
turn view_bobbing on and off. Also fixed a bug where footstep
sounds would not play when view_bobbing was disabled.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix various performance issues reported by cppcheck + code style (CI)
* Make CI happy with code style on master
* guiFileSelectMenu: remove useless includes
* some performance fixes pointed by cppcheck
* remove some useless casts
* TextDest: remove unused setFormSpec function
* Fix various iterator post-increment reported by cppcheck
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Player data to Database
Add player data into databases (SQLite3 & PG only)
PostgreSQL & SQLite: better POO Design for databases
Add --migrate-players argument to server + deprecation warning
* Remove players directory if empty
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Fix crash caused by destructor 'delete' on noise objects that are not
created due to mapgen options.
Crash was caused by commit 57eaf62c697cec91890d9cb28d10385d293d2d3f
|
| |
|
|
|
|
|
|
|
|
| |
The 'sneak glitch' physics override now controls whether a player can
use the new move code replications of the old sneak side-effects:
sneak ladders and 2 node sneak jump. This completes our intention to
replicate the old sneak side-effects in new code and provide them as
an option that is disabled by default.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This callback is called if a liquid definitely floods a non-air
node on the map. The callback arguments are (pos, oldnode, newnode)
and can return a `bool` value indicating whether flooding the
node should be cancelled (`return true` will prevent the node
from flooding).
Documentation is added, the callback function was tested with a
modified minetest_game.
Note that `return true` will likely cause the node's `on_flood()`
callback to be called every second until the node gets removed,
so care must be taken to prevent many callbacks from using this
return value. The current default liquid update interval is 1.0
seconds, which isn't unmanageable.
The larger aim of this patch is to remove the lava cooling ABM,
which is a significant cost to idle servers that have lava on their
map. This callback will be much more efficient.
|
| |
|
|
|
|
| |
* Also pass clang-format on guiFileSelectMenu.h and remove it from whitelist
|
|
|
|
|
|
| |
if mod is a reference to a class member a variable swap breaks.
We should find a way to keep this const ref if possible.
Added a comment about this in header
|
|
|
| |
it was used in minimal to trigger core crash, not very useful
|
|
|
|
|
|
|
| |
* Make CI happy with code style on master
* guiFileSelectMenu: remove useless includes
* some performance fixes pointed by cppcheck
* remove some useless casts
* TextDest: remove unused setFormSpec function
|
|
|
|
| |
immediately (#5621)
|
|
|
| |
This removes a segmentation fault and makes node meshes well colorized.
|
|
|
|
| |
This commit adds node overlays, which are tiles that are drawn on top of
other tiles.
|
|
|
| |
* Also remove 1 non declared but defined functions
|
| |
|
|
|
|
|
|
|
|
|
| |
This is not really different from the light update of a voxel
manipulator. This update does not assume that the lighting was correct
before, therefore it is useful for correction.
Also expose this function to the Lua API for light correction, and
allow voxel manipulators not to update the light.
|
|
|
|
| |
The common part can be reused.
|
|
|
|
| |
* Also remove 2 non declared but defined functions
* Make some functions around const ref changes const
|
|
|
|
| |
* Also remove InventoryList::peekItem unused function
* Fix some post increment to preincrement reported by cppcheck
|
| |
|
|
|
| |
Pointed by cppcheck
|
| |
|
|
|
|
| |
Put accessed members that are needed by updateFastFaceRow()
all in the same cacheline.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
I play with the TAB key bound to the inventory. However, the
code here assumes that TAB means "close formspec" in all contexts,
including the main menu. This causes my game to exit when I attempt
to TAB in between USERNAME and PASSWORD fields.
We know when m_client != NULL that the game is a client game and
not in the main menu, and then it's OK to use the INVENTORY bound
key to exit the formspec, since it's not the main menu.
|
|
|
|
|
| |
`round` -> `myround`
Remove superflous `floor` calls
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
copying done in the main thread
Cache size is configurable by the meshgen_block_cache_size (default 20 MB).
New profiler stats:
- MeshUpdateQueue MapBlock cache hit %
- MeshUpdateQueue MapBlock cache size kB
Removes one type of stutter that was seen on the client when received MapBlocks
were being handled. (the "MeshMakeData::fill" stutter)
Kind of related to at least #5239
Originally preceded by these commits, now includes them:
- Move the mesh generator thread into src/mesh_generator_thread.{cpp,h}
- mesh_generator_thread.cpp: Update code style
- MeshUpdateThread: Modify interface to house a different implementation: Actual functionality will be changed by next commits.
- MeshMakeData: Add fillBlockData() interface (so that caller can fill in stuff from eg. a MapBlock cache)
|
| |
|
|
|
|
|
|
| |
Temporary option for the old move code for specific old sneak behaviour.
Enabled by setting the added 'new move' physics override to false.
By default 'new move' is true.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* Resource leak: CHECK_FILE_ERR returns, without freeing chunk_name.
Found with static analysis.
* Resource leak: leaks `page` on error path.
Found with static analysis.
|