| Commit message (Collapse) | Author | Age |
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
The return value should be interpreted as a boolean saying whether
the lua on_punch function handled damage or the system needs to.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* This backend permit mods to store extra players attributes to a common interface.
* Add the obj:set_attribute(attr, value) Lua call
* Add the obj:get_attribute(attr) Lua call
Examples:
* player:set_attribute("home:home", "10,25,-78")
* player:get_attribute("default:mana")
Attributes are saved as a json in the player file in extended_attributes
key
They are saved only if a modification on the attributes occurs and loaded
when emergePlayer is called (they are attached to PlayerSAO).
|
|
|
|
| |
invocations of add_particle{,spawner} (fixes #5108)
|
|
|
|
|
|
| |
- Increase ContentFeatures serialization version
- Color property and palettes for nodes
- paramtype2 = "color", "colored facedir" or "colored wallmounted"
|
|
|
|
|
| |
os.exit will exit not using proper resource liberation paths.
Mods should call the proper exit mod using our API
|
| |
|
|
|
|
| |
Send texture modifier to clients connecting later too
|
| |
|
|
|
|
|
| |
This is implemented by reusing and extending the
TileAnimation code for the methods used by particles.
|
| |
|
| |
|
|
|
|
| |
* Added lua tracebacks to some errors where you have been blind to what actually went wrong
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Original credits goes to @Rogier-5
* Merge common attributes between LuaEntitySAO & PlayerSAO to UnitSAO
* Make some functions const
* Improve some lists performance by returning const ref
Signed-off-by: Loic Blot <loic.blot@unix-experience.fr>
|
|
|
|
|
| |
* Add staticdata parameter to add_entity
* Add add_entity_with_staticdata to core.features
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Environment code refactoring
* Cleanup includes & class declarations in client & server environment to improve build speed
* ServerEnvironment::m_gamedef is now a pointer to Server instead of IGameDef, permitting to cleanup many casts.
* Cleanup IGameDef
* Move ITextureSource* IGameDef::getTextureSource() to Client only.
* Also move ITextureSource *IGameDef::tsrc() helper
* drop getShaderSource, getSceneManager, getSoundManager & getCamera abstract call
* drop unused emerge() call
* cleanup server unused functions (mentionned before)
* Drop one unused parameter from ContentFeatures::updateTextures
* move checkLocalPrivilege to Client
* Remove some unnecessary casts
* create_formspec_menu: remove IWritableTextureSource pointer, as client already knows it
* Fix some comments
* Change required IGameDef to Server/Client pointers
* Previous change that game.cpp sometimes calls functions with Client + InventoryManager + IGameDef in same functions but it's the same objects
* Remove duplicate Client pointer in GUIFormSpecMenu::GUIFormSpecMenu
* drop ClientMap::sectorWasDrawn which is unused
|
|
|
|
| |
* also cleanup some unneeded inclusions
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Breath is now handled server side. Changing this behaviour required some modifications to core:
* Ignore TOSERVER_BREATH package, marking it as obsolete
* Clients doesn't send the breath to server anymore
* Use PlayerSAO pointer instead of peer_id in Server::SendPlayerBreath to prevent a useless lookup (little perf gain)
* drop a useless static_cast in emergePlayer
|
|
|
| |
Fixes a compiler warning on MSVC
|
|
|
|
|
|
|
| |
Currently, lua does a regular exit() after a lua panic, which can make
a problem hard to debug. Invoking FATAL_ERROR() instead will print
some useful information, and abort() minetest, so that a debugger can
be used to analyze the situation.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Trying to resolve a path with RemoveRelativePathComponents that can't
be resolved without leaving leading parent components (e.g. "../worlds/foo"
or "bar/../../worlds/foo") will fail. To work around this, we leave
the relative components and simply remove the trailing components one
at a time, and bail out when we find a parent component. This will
still fail for paths like "worlds/foo/noexist/../auth.txt" (the path
before the last parent component must not exist), but this is fine
since you won't be able to open a file with a path like that anyways
(the O.S. will determine that the path doesn't exist.
Try `cat /a/../etc/passwd`).
|
| |
|
|
|
|
| |
Allow any int value, and properly range check it before casting.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Schematics can already be placed with a param2 value, but not
simple 1-node plant decorations of the simple type.
This adds a `param2` field to the simple deco type that is
checked to be between 0 and 255, and put to the placed node
at mapgen.
This can be used to put a degrotate value in, or e.g. a fill
value for leveltype nodes, or a place_param2 value at mapgen
placement, or vary the shape of meshoptions plantlike drawtype.
|
|
|
|
|
|
|
| |
This combats the problem of sending the hundreds of
"creative" / "armor" or whatever detached invs that
exist on popular servers to each and every player
on join or on change of said invs.
|
|
|
| |
Since light_source>15 causes crash, it must be limited.
|
|
|
|
|
| |
It used to drop all of the return values from the
insecure version of the function.
|
| |
|
|
|
|
| |
This reverts commit 93e3555eae2deaeca69ee252cfa9cc9c3e0e49ef.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Active objects that are attached to other objects are not safe
from deletion. As a result, the parent object may have a reference
to an id of a child's that no longer exists.
If at some point an attempt is made to manipulate the child,
enviromment->getActiveObject(child-id) returns NULL. Using the
NULL pointer causes the crash...
|
| |
|
|
|
| |
Add minetest.get_server_uptime() function to Lua API
|
| |
|
|
|
|
| |
Update lua_api.txt.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Create UnitSAO, a common part between PlayerSAO & LuaEntitySAO
* Move breath to PlayerSAO & LocalPlayer
* Migrate m_yaw from (Remote)Player & LuaEntitySAO to UnitSAO
* Migrate m_yaw from Player to LocalPlayer for client
* Move some functions outside of player class to PlayerSAO/RemotePlayer or LocalPlayer depending on which class needs it
* Move pitch to LocalPlayer & PlayerSAO
* Move m_position from Player to LocalPlayer
* Move camera_barely_in_ceiling to LocalPlayer as it's used only there
* use PlayerSAO::m_base_position for Server side positions
* remove a unused variable
* ServerActiveObject::setPos now uses const ref
* use ServerEnv::loadPlayer unconditionnaly as it creates RemotePlayer only if it's not already loaded
* Move hp from Player to LocalPlayer
* Move m_hp from LuaEntitySAO to UnitSAO
* Use m_hp from PlayerSAO/UnitSAO instead of RemotePlayer
|
| |
|
|
|
|
|
|
|
| |
Modification of the emergeblocks internal state was not protected
by a lock, causing a race condition.
This can be reproduced by repeatedly running emergeblocks for an
already-generated section of the map (with multiple emerge threads).
|
| |
|
| |
|