Commit Graph

203 Commits (e98d421aff046a2d9a9b87516779603dc170b209)

Author SHA1 Message Date
MoNTE48 e98d421aff Merge remote-tracking branch 'upstream/stable-0.4' into sync 2019-04-01 20:18:54 +02:00
Loïc Blot b3f0342fac Revert "upright_sprite: Fix texture position for players"
This reverts commit d58801ab3204757e6c49892a05633281144f4f44.
2019-01-03 12:04:51 +01:00
SmallJoker f6286e636b C++03 oldify in various source files 2018-06-03 17:32:00 +02:00
SmallJoker 393ebea601 upright_sprite: Fix texture position for players Fixes #6471 2018-06-03 17:32:00 +02:00
lhofhansl e1c5e4ac7e Avoid filtering low-res textures for animated meshes (incl. players) (#6562) 2018-06-03 17:32:00 +02:00
paramat c8dba10a93 CAO footstep sounds: Reduce gain to balance volume 2018-06-03 17:31:59 +02:00
Maksim Gamarnik 35770f4abb Merge Minetest 0.4.16 2017-06-06 23:03:34 +03:00
stujones11 8f600348f8 Don't add damage flash while punch texture modifier is active (#5767) 2017-05-29 23:26:25 +02:00
Loïc Blot 244f869f3f Various code cleanup & little performance improvement on HTTP download (#5772)
* Disable or remove unused enum members/functions
* Tiny code style fixes
* Make some functions const
* Replace ClientMediaDownloader std::unordered_map with std::map
2017-05-20 08:15:56 +02:00
paramat 701d48a1be Revert custom player collision box and step height commits
These caused inability to pass through 2 node high spaces or step up onto slabs
or steps when a new client connected to an older server.
2017-05-09 03:52:28 +01:00
ShadowNinja 35d2f88f51 Clean up numeric.h and split FacePositionCache from it
I also optiized FacePositionCache a bit: I removed a map
lookup and vector copy from both branches of getFacePosition.
2017-05-06 16:09:45 -04:00
TeTpaAka 8434302604 Make the player collisionbox settable 2017-05-06 15:41:05 -04:00
TeTpaAka c1a84eb834 Make players respect makes_footstep_sound in the object properties 2017-05-06 20:16:16 +02:00
Loïc Blot 7d954da188 content_cao: fix getPlayerControl structure copy on each step (#5677)
Also fix some codestyle issues around it.
2017-04-29 18:16:58 +02:00
Loic Blot 819fca7a0e Revert a const ref on update texture
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
2017-04-22 00:36:59 +02:00
Loïc Blot db34330121 Fix various variables passed by copy instead of const ref (#5610)
Pointed by cppcheck
2017-04-19 00:36:30 +02:00
paramat afe086801d Sneak: Add option for old move code
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.
2017-04-17 10:13:05 +01:00
Dániel Juhász 88b956fe8e Hardware coloring for itemstacks
Adds the possibility to colorize item stacks based on their metadata.

In the item/node definition you can specify palette (an image file)
and color (fallback color if the item has no palette or metadata).
Then you can add palette_index to the metadata.

Dropped itemstacks with different colors do not merge.
2017-04-08 18:39:15 -07:00
rubenwardy 8441029477 Add ItemStack key-value meta storage 2017-02-04 22:07:55 +00:00
Maksim Gamarnik e05f7db82f Updated to Minetest ver. 0.4.15 2017-01-30 00:44:07 +02:00
sapier 510e33f424 Fix unknown command message not providing number of cmd 2017-01-21 17:16:22 +01:00
sapier 8df666f56e Add Entity get_texture_mod() to Lua API
Send texture modifier to clients connecting later too
2017-01-21 17:01:02 +01:00
red-001 4fa41de084 Remove `mathconstants.h` and use the correct way to get `M_PI` in MSVC. (#5072) 2017-01-20 23:19:41 +01:00
Loic Blot 403fb3fcc3 Fix another missing const reported by clang & @sfan5
Signed-off-by: Loic Blot <loic.blot@unix-experience.fr>
2017-01-14 12:20:59 +01:00
Rogier 1386ba186e Performance fix + SAO factorization
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>
2017-01-11 15:53:56 +01:00
Ner'zhul 14a094c1a2 Environment & IGameDef code refactoring (#4985)
* 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
2017-01-09 20:39:22 +01:00
Rogier 18bdc18f75 Move PP() and PP2() macros to basic_macros.h
Instead of redefining them everywhere.
2016-12-24 00:32:50 +00:00
orwell96 a1097d3a35 Particles: Make attached particle spawners respect the parent's yaw
Position, velocity and acceleration vectors of particles are rotated
by the yaw of the parent object so that they are truly relative to it.
Clarify new attached particle spawner behavior in lua_api.txt.
2016-11-18 06:18:54 +00:00
Maksim Gamarnik 0f0455ab07 Update Android, remove content_cso 2016-10-24 18:26:32 +03:00
Foghrye4 e2b3b4ba07 Fix crash on attaching player to entity
Rename "refresh" to "processInitData"
2016-10-19 08:40:43 +02:00
Loic Blot ef7735ab3a A little cleanup since previous commit 2016-10-09 16:31:43 +02:00
Loic Blot 94cfb9ae7c Environment cleanup
* Move client list to ServerEnvironment and use RemotePlayer members instead of Player
* ClientEnvironment only use setLocalPlayer to specify the current player
* Remove ClientEnvironment dead code on player list (in fact other players are CAO not Player objects)
* Drop LocalPlayer::getPlayer(xxx) functions which aren't used.
* Improve a little bit performance by using const ref list for ClientEnvironment::getPlayerNames() & Client::getConnectedPlayerNames()
* Drop isLocal() function from (Local)Player which is not needed anymore because of previous changes

This change permits to cleanup shared client list which is very old code.
ClientEnvironment doesn't use player list anymore, it only contains the local player, as addPlayer is only called from Client constructor client side.
Clients are only CAO on client side, this cleanup permit to remove confusion about player list.
2016-10-09 15:17:10 +02:00
Loic Blot 3558ac7829 More code cleanup (UNORDERED + RemotePlayer/LocalPlayer)
* ClientEnvironment now uses UNORDERED MAP for active objects
* Use RemotePlayer and LocalPlayer everywhere it's possible
* Minor code style fixes
* Drop Client::getBreath() unused function
2016-10-08 22:27:44 +02:00
Foghrye4 5f714c5c6f Prevent attached models from disappearing during parent reload (#4128) 2016-10-08 14:51:25 +02:00
Loic Blot 2b5c276768 Use more unordered_maps to improve performance in c++11 builds 2016-10-06 12:33:35 +02:00
Loic Blot 0b2db1f16b Compilation fix 2016-10-05 20:58:05 +02:00
Loic Blot 17bad192fe Replace various std::map with UNORDERED_MAP + various cleanups
This is part 2 for 5f084cd98d7b3326b51320455364337539710efd

Other improvements:

* Use the defined ItemGroupList when used
* make Client::checkPrivilege const
* inline some trivial functions
* Add ActiveObjectMap typedef
* Add SettingsEntries typedef
2016-10-05 10:53:19 +02:00
SmallJoker ab4cabb7b5 Upright sprite objects: Horizontally flip the front image
For consistent horizontal sprite structure when seen from front and back
Fix code style
2016-07-27 22:21:41 +01:00
est31 b7d656581d Initial Gamepad support
Adds initial ingame gamepad support to minetest.

Full Formspec support is not implemented yet and
can be added by a later change.
2016-06-03 19:42:57 +02:00
Loic Blot e9240c67cb Fix a m_camera not used warning fix pointed by clang 2016-05-22 13:31:41 +02:00
Maksim Gamarnik 2bc88a95a4 Part I 2016-04-18 22:40:42 +03:00
Maksim Gamarnik 3efde6c9c3 Merge remote-tracking branch 'upstream/master' 2016-02-19 00:39:50 +02:00
RealBadAngel e0f29ab7d3 Move object nametags to camera 2016-02-18 16:43:29 +01:00
Maksim Gamarnik d7c0fad71f Merge Minetest commits 2016-02-11 22:35:23 +02:00
nerzhul c4bf66116d v2d & aabbox3d<f32> & sky cleanups
* Sky: rename Box => m_box and inline getBoundingBox
* Uniformize aabbox3d<f32> to aabb3f
2016-02-11 16:55:15 +01:00
Maksim Gamarnik 2520ca3ed1 Merge branch 'master' of https://github.com/minetest/minetest 2016-01-31 20:57:03 +02:00
est31 d6f58c3f84 Don't pass non-const references to collision methods
Non const references cause a lot of confusion with behaviour of code,
and are disallowed by minetest style guide.
2016-01-29 15:53:54 +01:00
Sapier d0ee99205c Revert "Add support for using arbitrary meshes as items"
This reverts commit 91bafceee6606fab79db1bde4cba01b84fed65c7.

Reverted due to missinterpretation of agreement, obvious dislike and me not interested in doing fights for feature I don't actually need
2015-12-29 19:53:38 +01:00
Sapier 1c1294812b Add support for using arbitrary meshes as items 2015-12-29 16:27:06 +01:00
Maksim Gamarnik 23614e9479 Merge
I have not tested this
2015-12-28 11:26:50 +02:00