56 Commits

Author SHA1 Message Date
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
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
paly2
30c1905f89 Add minetest.unregister_item and minetest.register_alias_force 2016-09-08 03:26:52 -04:00
RealBadAngel
013ef76173 Use meshes to display inventory items 2016-02-07 19:51:55 +01:00
Sapier
814539a0e3 Revert "Refactoring and code style fixes in preparation of adding mesh typed items"
This reverts commit f14e7bac54af65e3d3d99f89f23f114b17058e49.

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:55:50 +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
Sapier
1d96a56263 Refactoring and code style fixes in preparation of adding mesh typed items 2015-12-29 16:27:06 +01:00
BlockMen
7477ba044c Add support for audio feedback if placing node failed 2015-11-07 13:23:38 +01:00
kwolekr
5b30bbcc23 Refactor thread utility interface
- Add "thr_" prefix to thread utility functions
- Compare threadid_ts in a portable manner, where possible
2015-10-16 22:20:24 -04:00
David Jones
9d1284b324 Change i++ to ++i 2015-08-25 18:33:52 -04:00
kwolekr
4df33b90e5 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
Craig Robbins
0731f9ed2a 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
Craig Robbins
27791ee1aa 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
188c15c3d8 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
fce90c5a92 Use std::vector instead of std::list in StaticObjectList and MutexedMap::getValues() 2015-03-04 17:22:37 +01:00
Craig Robbins
43bfdaab5f 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
Craig Robbins
92c52c10c0 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
da65100b53 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
Kahrl
c33891174d Implement WieldMeshSceneNode which improves wield mesh rendering
- Don't create and cache an extruded mesh for every (non-node) item.
  Instead use a single one per image resolution.

- For cubic nodes reuse a single wield mesh too

- Improve lighting of the wielded item

- Increase far value of wield mesh scene camera, fixes #1770

- Also includes some minor refactorings of Camera and GenericCAO.
2014-11-08 23:11:57 +01:00
RealBadAngel
b015b62dad Add option to enable mesh caching, add wallmounted for meshes. 2014-10-29 08:37:33 +01:00
sapier
268ff61168 Add support for Android 2.3+
There have been plenty of ppl involved in creating this version.
I don't wanna mention names as I'm sure I'd forget someone so I
just tell where help has been done:
- The partial android versions done by various ppl
- Testing on different android devices
- reviewing code (especially the in core changes)
- testing controls
- reviewing texts

A big thank you to everyone helping this to be completed!
2014-06-29 18:17:56 +02:00
Novatux
a662fe9fc4 Fix rendering glitches when far from the center of the map 2014-03-04 20:12:10 +01:00
sapier
f04d2ad9e3 Make MutexQueue use jsemaphore for signaling 2014-01-10 10:10:45 +01:00
RealBadAngel
c18af13697 Shaders rework. 2013-12-03 18:55:25 +01:00
sapier
4aa8a5c636 Fix Result of processed Request was written to invalid (non existent) ResultQueue if requesting thread timed out before 2013-11-17 12:46:54 -05:00
sapier
78cc469411 Fix multicaller support in RequestQueue 2013-11-17 12:45:58 -05:00
PilzAdam
5d02ca8efd Bump protocol version 2013-07-20 21:25:21 +02:00
PilzAdam
9cc15d669e Make range of tools configureable 2013-07-20 20:37:59 +02:00
Kahrl
03631ae5f7 Change ContentFeatures array to a vector 2013-07-14 23:06:31 +02:00
sapier
4f7abcbafa Fix many formspec menu bugs 2013-07-07 19:49:52 -04:00
Kahrl
d507e28438 Move generateTextureFromMesh to TextureSource to fix a texture leak
TextureSource has a list of textures to delete (m_texture_trash) so this
provides a proper, non-hacky way to delete RTT textures. Also, the prior,
hacky way of deleting them seems to be broken (see pull request #803).

To avoid header file clutter by repeating the same long list of
arguments over and over again, store the arguments of
generateTextureFromMesh in a struct called TextureFromMeshParams.

Also fix issue #782 (Only use bilinear (and others) on item textures
when settings allow it).
2013-07-03 03:24:28 +02:00
Kahrl
46340cbbe0 Remove texture atlas / AtlasPointer, rename getTextureRaw to getTexture 2013-07-02 03:03:10 +02:00
sapier
6d6a9a17e1 Really fix itemdef memory leak 2013-05-09 17:08:23 +02:00
kwolekr
2df490067f Fix itemdef drop on NULL texture 2013-04-28 21:07:09 -04:00
sapier
fafad98056 fix extruded items texture leak 2013-04-09 02:14:52 -04:00
sapier
0e48411a29 fix memory leak in itemdef
cleanup useless code
2013-04-07 22:20:01 -04:00
PilzAdam
b4bd7523e0 Add different place sound for nodes 2013-03-29 20:14:18 +01:00
PilzAdam
dd744fc13f New damage system, add damageGroups to ToolCapabilities, bump protocol version 2013-03-29 20:14:09 +01:00
Ilya Zhuravlev
a12df55f29 Migrate to STL containers/algorithms. 2013-03-11 19:08:39 -04:00
PilzAdam
93ee0bd94b Fix nodeplacement prediction 2013-02-27 20:23:32 +01:00
Sfan5
3fab3825aa Update Copyright Years 2013-02-24 20:15:24 +01:00
PilzAdam
269f01224b Change Minetest-c55 to Minetest 2013-02-24 18:49:03 +01:00
Jeija
d077333a77 Disable placement prediction for nodes that use on_rightclick 2013-02-19 20:02:40 +01:00
Perttu Ahola
a4ca9f7699 Handle day-night transition in shader and make light sources brighter when shaders are used 2012-12-02 14:24:58 +02:00
Perttu Ahola
e187e834c3 On-demand item meshes and textures 2012-12-02 00:38:26 +02:00
Perttu Ahola
ec937ecdd8 Properly and efficiently use split utility headers 2012-06-17 02:40:36 +03:00
Perttu Ahola
92b131d6d1 Node texture animation 2012-06-16 16:47:28 +03:00
Perttu Ahola
3946557a18 Node placement client-side prediction 2012-06-10 12:46:48 +03:00
Perttu Ahola
e70b6545b1 Switch the license to be LGPLv2/later, with small parts still remaining as GPLv2/later, by agreement of major contributors 2012-06-05 18:54:07 +03:00