263 Commits

Author SHA1 Message Date
ShadowNinja
2cb27a5fb6 Clean up database API and save the local map on an interval 2015-03-06 00:20:45 -05:00
Loic Blot
b6a8f1e7c4 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
1186245881 Remove Queue class which uses std::list and use native std::queue 2015-03-05 16:49:51 +10:00
Loic Blot
12d7ac0fec Fix some memory leaks on packet sending. 2015-02-21 17:27:31 +01:00
Loic Blot
f764ef3076 Replace std::list by std::vector into timerUpdate calls 2015-02-17 15:08:37 +01:00
Loic Blot
ba3e67271c Remove old comment from Network Rework Patch 2/4 2015-02-17 14:49:21 +01:00
Loic Blot
416ba2b408 [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
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
Loic Blot
d80a529d34 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
ShadowNinja
0a2e53077b Reduce gettext wide/narrow and string/char* conversions 2015-02-05 03:24:22 -05:00
Craig Robbins
13cd83962f 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
sapier
3bba80cbc2 Fix memory leaks due to messed up memory handling for particles as well as their spawners 2015-01-09 15:23:49 +01:00
kwolekr
bcf72f8481 NodeResolver: Perform callback immediately if node registration phase finished
Also add NodeResolver callbacks on the client
2015-01-04 16:32:31 -05:00
sapier
6736de24c6 More consistent progress bar from 0-100 on startup 2015-01-02 17:53:42 +01:00
ShadowNinja
617537325c Fix missing call to std::ostringstream::str 2014-12-12 16:32:11 -05:00
Anton
420b5ec08c Use std::string::empty() instead of size() where applicable 2014-12-12 15:16:24 -05:00
RealBadAngel
b16a3788d5 Fix lighting artifacts (Issue #1887). 2014-12-08 08:53:31 +01:00
Craig Robbins
0be778ad52 Performance of main client loop up to 2x faster In places, up to 3 times faster
NOTE 1: This does not mean a 2x increase in framerate. Increase in fps may be up to 1-2fps
NOTE 2: This local 'caching' of settings is not optimal and an alternative solution will be worked on after 0.4.11 is released
2014-12-07 00:51:01 +10:00
Craig Robbins
203dfd7e80 Fix node 0,0,0 being highlighted when enable_node_highlighting == false
Without this patch node 0,0,0 is highlighted when enable_node_highligting is false
There is a minor lighting issue remaining, however it seems to be related to a different bug (https://github.com/minetest/minetest/issues/1887)
2014-12-01 22:13:21 +10:00
sapier
794909cbe8 Implement proper font handling 2014-11-30 17:50:09 +01:00
Craig Robbins
cc53cc316c Fix client "double saving" simple singleplayer local maps 2014-11-26 00:49:54 +10:00
sfan5
120a177e08 Add (optional) client-side saving of server map to disk 2014-11-19 15:11:23 +01:00
RealBadAngel
fecad5fb24 Speed up removing a node (less block mesh updates). 2014-11-08 21:04:30 +01:00
RealBadAngel
8ddf8a4022 Recalculate normals for cached meshes.
Check if mesh is here before adding to meshcollector.

Fix deleting the meshes.
2014-10-21 18:43:29 +02:00
Craig Robbins
df5491d040 Various uninitialised variable fixes
sky.cpp: m_bgcolor.getAlpha() was being used before initialised

mesh related: m_highlight_mesh_color was being used uninitialised
2014-10-19 15:33:08 +02:00
RealBadAngel
1c09928344 Add meshnode drawtype. 2014-10-18 16:42:23 +02:00
ShadowNinja
4d2318b576 Simplify player modification checks 2014-10-01 18:44:36 -04:00
ShadowNinja
dbf9e444b1 Split settings into seperate source and header files
This also cleans up settings a bit
2014-09-21 14:39:35 -04:00
BlockMen
f77a8a9408 Allow taking screenshots of formspecs and move message to chat 2014-09-21 19:15:48 +02:00
RealBadAngel
61b86590fc Node highlighting. 2014-09-17 22:06:13 +02:00
Kahrl
cefcd73552 Move #includes from version.h to version.cpp 2014-08-10 01:03:52 +02: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
RealBadAngel
068b1ca61d Unite nodes shaders.
Pass drawtype and material type to shaders.
Move shaders generation to startup only.
Allow assign shaders per tile.
Initial code to support water surface shader.
2014-06-15 05:40:33 +02:00
sapier
1d6a1f727d Add support for interlaced polarized 3d screens
Add (experimental) support for topbottom as well as sidebyside 3d mode
2014-05-18 01:08:13 +02:00
sapier
f67b1b8f94 Send max number of characters instead of asserting in case of too long chat messages 2014-05-11 15:39:38 +02:00
sapier
2f2b4dc512 Fix invalid cast fix resulting in chat messages beeing limited to 256 bytes 2014-05-11 15:32:15 +02:00
sapier
d83d1a95b7 Fix heart + bubble bar size on different texture packs
Add DPI support for statbar
Move heart+bubble bar to Lua HUD
Add statbar size (based upon an idea by blue42u)
Add support for customizing breath and statbar
2014-05-07 21:46:27 +02:00
sapier
8acea4b9f8 Add hack to avoid 2s startup delay on local games 2014-05-02 00:18:25 +02:00
sapier
b1c81e8147 Add download rate to media progress bar (non http mode only!)
Minor coding style fixes
2014-04-29 20:45:16 +02:00
BlockMen
f2e2f59cdd Use integers instead of float values 2014-04-12 20:04:12 +02:00
BlockMen
a5db2961b2 Add player:set_eye_offset() by @MirceaKitsune and clean up 2014-04-12 17:44:20 +02:00
BlockMen
8909fe913c Add third person view 2014-04-12 17:44:15 +02:00
sapier
607f617471 Add support for named threads (atm linux only) 2014-04-09 21:32:21 +02:00
sapier
bc7084892d Cleanup client init states by bumping protocol version
Don't use TOSERVER_RECEIVED_MEDIA but TOSERVER_CLIENT_READY as indicatio for client ready
Handle clients with protocol version < 23 (almost) same way as before
Make client tell server about it's version
Add client state to not send bogus player position updates prior init complete
Add access to statistics information (peer connction time,rtt,version)
Fix clients standing stalled in world while preloading item visuals (new clients only)
Add get_player_information to read client specific information from lua
2014-04-08 21:12:20 +02:00
Selat
a83693c5c3 Pass arguments by reference 2014-03-12 17:34:48 -04:00
Novatux
a662fe9fc4 Fix rendering glitches when far from the center of the map 2014-03-04 20:12:10 +01:00
sapier
85e007482b Remove lots of dead code
Add check for datatype overflows
use native datatype indices instead of fixed 16bit/32bit ones
2014-02-07 21:39:45 +01:00
Perttu Ahola
0ad66f64a5 Add player:override_day_night_ratio() for arbitrarily controlling sunlight brightness 2014-02-01 18:38:21 +01:00