Commit Graph

567 Commits

Author SHA1 Message Date
SmallJoker c40e993ce4 Replace setting unlimited_player_transfer_distance with player_transfer_distance 2014-11-08 14:56:09 +01:00
kwolekr 9e811a92e7 Split up mapgen.cpp 2014-11-01 13:16:23 -04:00
kwolekr d274cbfce6 Add NodeResolver and clean up node name -> content ID resolution system 2014-10-26 23:55:45 -04:00
RealBadAngel d221917170 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
ShadowNinja e9c9b66ae9 Make players check inventory modification properly 2014-10-01 18:44:36 -04:00
ShadowNinja cd0df0d5e7 Simplify player modification checks 2014-10-01 18:44:36 -04:00
ShadowNinja c061bdd37f Fix locking bugs and make inventory deserialization errors more specific 2014-09-21 14:39:36 -04:00
sapier dec8c43de3 Fix to to too two times 2014-08-22 21:51:20 +02:00
sapier d7d8aa1039 Add player name length checks 2014-08-22 21:18:43 +02:00
sapier 8e9d896f2d Fix "ghost" blocks if block update is "on wire" while player digs nodes 2014-08-22 20:56:16 +02:00
sapier 2a5c88bde1 Don't call a player event without having player to do a event for 2014-08-21 17:29:26 +02:00
sapier d38f6ebb9b Fix error handling on inconsistent client ready message
Fix android makefile to provide a correct dummy githash if detection fails
2014-07-16 20:01:00 +02:00
ShadowNinja 9afeb97fc6 Fix serverlist code style, const-correctness, and types 2014-06-30 13:26:02 -04:00
sapier ff36071d93 Don't spam server console on player/playersao error but just drop the affected client 2014-06-29 17:55:21 +02:00
sapier ebf7ea5019 Add formspec api versioning 2014-06-29 12:13:55 +02:00
kwolekr c91f8b1d25 Add prefixes to enum values and fix style issues 2014-06-28 02:02:38 -04:00
ShadowNinja 7e6db1b803 Only keep players loaded while they're connected 2014-06-23 15:45:59 -04:00
sapier a0097c6bfa Fix uncought deserialization error on receiving data 2014-06-22 00:05:41 +02:00
sapier f8522d50e7 Fix server assert in case of invalid message from client, just kick that client. 2014-06-21 23:56:46 +02:00
sapier d76b8c6e7c Small cleanup of hud add/remove code 2014-05-31 22:32:44 +02:00
sapier 73e5bc9c01 Add joining player to printed player list 2014-05-20 18:09:32 +02:00
sapier 6c37e89f08 Fix old client showing duplicated health bar on new server
Fix client not showing hearts and bubbles on connecting to old server
Fix server not remembering hud flags correctly
2014-05-11 22:34:44 +02:00
sapier f76b9d724b Fix possible deadlock in error conditions 2014-05-11 00:14:57 +02:00
ShadowNinja 1cd512913e Organize builtin into subdirectories 2014-05-07 17:14:23 -04:00
sapier d3ee617f37 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 555dc86343 Add missing ip address to player join log entry 2014-04-21 22:28:52 +02:00
sapier a0dd2d89f3 Reduce log level for incoming crap packets
Add log entry for peer timeout
2014-04-19 22:12:01 +02:00
BlockMen 8b02a015eb Use integers instead of float values 2014-04-12 20:04:12 +02:00
BlockMen c0ab09af74 Add player:set_eye_offset() by @MirceaKitsune and clean up 2014-04-12 17:44:20 +02:00
BlockMen a1db9242ec Add third person view 2014-04-12 17:44:15 +02:00
Kahrl 6090e95cdc Infer ipv6_server from bind_address; fix client connect to IN(6)ADDR_ANY 2014-04-10 22:03:42 +02:00
sapier edcad09dee Add support for named threads (atm linux only) 2014-04-09 21:32:21 +02:00
sapier 142e2d3b74 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 7cac34c807 Pass arguments by reference 2014-03-12 17:34:48 -04:00
ShadowNinja 9a3b7715e2 Remove "Server -!- " prefix from player messages 2014-02-27 00:00:22 -05:00
kwolekr 3570f3e396 Add minetest.set_noiseparam_defaults() Lua API 2014-02-15 19:13:14 -05:00
sapier ded5f8b1a6 Fix possible missing unlock of env_lock 2014-02-12 19:47:27 +01:00
kwolekr 89f7dc1efd ServerEnvironment: Remove direct dependency on EmergeManager 2014-02-09 16:36:30 -05:00
ShadowNinja 85fe75d1cb Add the option to bind to a specific address 2014-02-05 21:24:46 +01:00
kwolekr 5a34f40d80 Huge overhaul of the entire MapgenParams system
MapgenParams is no longer a polymorphic class, eliminating the need for messy and bug-prone reallocations.
Separation between the common and mapgen-specific parameters is now strongly defined.
Mapgen parameters objects are now properly encapsulated within the proper subsystems.
2014-02-03 22:50:14 -05:00
sapier e7c2e61b19 Add additional check to avoid broadcasting private messages in error conditions 2014-02-02 01:55:24 +01:00
Perttu Ahola 6a3fa9df12 Add player:override_day_night_ratio() for arbitrarily controlling sunlight brightness 2014-02-01 18:38:21 +01:00
Perttu Ahola 86a6cca3cf Add player:set_sky() with simple skybox support 2014-02-01 18:34:26 +01:00
sapier e258675eab Add propper client initialization
-add client states to avoid server sending data to uninitialized clients
  -don't show uninitialized clients to other players
  -propper client disconnect handling
Minor comment fixes in server
Minor bugfixes in connection
  -improved peer id calculation
  -honor NDEBUG flag
  -improved disconnect handling
  -increased initial send window
Remove some dead code
2014-01-31 18:44:43 +01:00
RealBadAngel 21f1bec724 New HUD element - waypoint. 2014-01-26 21:31:59 +01:00
kwolekr 9b978db0c2 Fix use of previously deallocated EmergeManager 2014-01-26 01:12:18 -05:00
ShadowNinja 76d4396fa1 Pass pointed_thing to on_punch and minetest.register_on_punchnode callbacks 2014-01-23 19:21:56 -05:00
khonkhortisan 2b1eff7725 Allow vertical axis particle rotation constraint
Use tables for adding particles, deprecate former way.

separate particles(pawner) definition, add default values, work with no
arguments
2014-01-13 17:34:56 -05:00
sapier 9edb91da57 Fixed minetest reliable udp implementation (compatible to old clients) 2014-01-10 10:10:45 +01:00
ShadowNinja 0fd5c61c00 Revert "Improve (re)spawn, add cache_block_before_spawn and max_spawn_height settings"
The commit didn't work because the blocks weren't loaded yet.

This reverts commit 22dbbf0a6f.

Conflicts:
	minetest.conf.example
2014-01-06 21:25:10 -05:00
proller c62bab010f Send long announce as POST, show OS in useragent
Add lag reporting to masterserver (average dtime)
StyledWriter  -> FastWriter in masterserver announce
2014-01-07 02:50:45 +04:00
ShadowNinja 2902a29c2d Initialize world before creating BanManager and RollbackManager 2013-12-30 14:29:33 -05:00
sapier e9e9fd7c3f Replace SimpleThread by JThread now implementing same features 2013-12-15 13:39:42 +01:00
kwolekr 7a4c1e7327 Update mapgen params in ServerMap after Mapgen init 2013-12-14 10:49:20 -05:00
Kahrl 0404bbf671 Rewrite client media download and support hash-based remote download
Move most of the media-related code in client.cpp into a new class
ClientMediaDownloader (clientmedia.cpp, clientmedia.h). Among other
things, this class does the following things:

- Download [remote_server][sha1] instead of [remote_server][name]. This
is to support servers that provide the same file name with different
contents.
- Initially fetch [remote_server]index.mth. This file should follow the
Minetest Hashset format (currently version 1) and contain a list of SHA1
hashes that exist on the server.
- The list of needed SHA1s is uploaded (via HTTP POST) when index.mth is
requested, so servers can optionally narrow down the list to the needs
of the client.
- If index.mth is missing (HTTP response code 404), we enter compat mode,
fetching [remote_server][name] as before this commit.
- remote_server can now contain multiple servers, separated by commas.
The downloader code attempts to split requests between the different
servers, as permitted by each server's index.mth. If one server claims
to have a file but actually doesn't (or something fails), we ask a
different server that also claims to have it.
- As before, when none of the remote servers provide a particular
file, we download it via the conventional method, i.e. using
the minetest protocol: TOSERVER_REQUEST_MEDIA / TOCLIENT_MEDIA.
- Bugfix: Every downloaded file's SHA1 is now verified against the SHA1
announced by the minetest server (before loading it and inserting it
into the file cache).
- Bugfix: Only send TOSERVER_RECEIVED_MEDIA when we actually have all
media. This should fix #863.
2013-12-13 18:05:20 +01:00
kaeza 33de69a173 Add 'on_prejoinplayer' callback 2013-12-12 13:42:14 -05:00
sweetbomber 22dbbf0a6f Improve (re)spawn, add cache_block_before_spawn and max_spawn_height settings 2013-12-05 16:09:02 -05:00
sapier 04e9a9d541 Cleanup jthread and fix win32 build 2013-12-01 16:25:46 +01:00
Novatux d879a539cd Add minetest.swap_node 2013-11-30 18:37:56 +01:00
Novatux bd6d4666ab Add a callback: minetest.register_on_craft(itemstack, player,
old_craft_grid, craft_inv) and
minetest.register_craft_predict(itemstack, player, old_craft_grid,
craft_inv)
2013-11-01 15:55:34 +01:00
proller a924409bd1 Masterserver update 2013-10-18 01:32:49 +04:00
Kahrl 8bc7ea61b9 Show git hash in version string at top left corner of window 2013-09-28 21:30:17 +02:00
kwolekr c0398224ef Fix some warnings and other minor details 2013-09-16 23:52:42 -04:00
kwolekr d308352dbd Always use builtin JThread library 2013-09-15 23:00:01 -04:00
PilzAdam 7860097eda Use player:set_hotbar_image() instead of hardcoded hotbar.png 2013-09-05 00:21:16 +02:00
Ilya e61b1773c9 Server::ProcessData(): call getBanName once instead of twice (#639) 2013-09-03 07:34:43 +02:00
PilzAdam 787b43b218 Send player damage to all clients and apply [brighten 2013-08-17 01:23:25 +02:00
Kahrl 4e1f50035e Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenu 2013-08-14 21:03:33 +02:00
Perttu Ahola 35c5ccfad3 Don't freak out when a client sends multiple TOSERVER_INIT packets; also log one thing more. 2013-08-08 06:11:43 +03:00
Perttu Ahola 61f240946a Clean up server's log messages and give a better error to client when its player is in use 2013-08-06 18:13:11 +03:00
Novatux 383153419b Add texture pack selection to main menu 2013-08-04 16:52:30 +02:00
Perttu Ahola e6687be493 Fix server getting completely choked up on even a little of DoS
* If client count is unbearable, immediately delete denied clients
* Re-prioritize the checking order of things about incoming clients
* Remove a huge CPU-wasting exception in ReliablePacketBuffer
2013-08-04 10:44:37 +03:00
Perttu Ahola 8831669505 Allow mods to listen to cheat detections using minetest.register_on_cheat() 2013-08-04 00:45:49 +03:00
Perttu Ahola 742614180c Fix anticheat 2013-08-03 23:16:37 +03:00
proller 06cdce1e12 Weather backward compatibility 2013-08-02 00:51:36 +04:00
proller e65d8ad655 Dont announce server in singleplayer 2013-07-27 17:51:34 +04:00
proller 3629a90c2e Cosmetic player info changes 2013-07-24 02:41:03 +04:00
RealBadAngel d19c8b815d Add set_breath and get_breath to lua API. 2013-07-20 20:34:11 +02:00
proller ac7a44792c Masterserver mods announse, ipv6, better curl errors 2013-07-13 00:19:05 +04:00
PilzAdam 320a00e7c6 Disallow the name 'singleplayer' in a multiplayer server 2013-07-12 02:15:09 +02:00
kwolekr 2e292b67a0 Add Lua on_mapgen_init callback, and minetest.set_mapgen_params API 2013-06-27 22:35:35 -04:00
proller f764297be2 Math mapgen fix, ip show on connect, pathfinder segfault fix 2013-06-23 20:35:16 +04:00
proller f960c3be31 Add support for IPv6
Two new configuration options are added:
     - "enable_ipv6" to enable/disable the overall use of IPv6
     - "ipv6_server" to enable/disable the use of IPv6 sockets when running
       a server (when "enable_ipv6" is enabled)
2013-06-23 11:31:22 +04:00
Kahrl b5918760fb Tweak IDropAction restriction handling in server.cpp 2013-06-16 17:01:21 +02:00
Kahrl 96fe1de832 Add ObjectRef.hud_set_hotbar_itemcount and add TOCLIENT_HUD_SET_PARAM 2013-05-26 00:23:33 +02:00
sapier ab43377577 Move scriptapi to separate folder (by sapier)
On the lua side, notably minetest.env:<function>(<args>) should now
be replaced by minetest.<function>(<args>).
The old way is and will stay supported for a long time.

Also:
Update and clean up lua_api.txt (by celeron55)
Move EnvRef to lua and remove add_rat and add_firefly (by kahrl)
Add separate src/util/CMakeLists.txt, other minor fixes (by kahrl)
2013-05-25 00:51:02 +02:00
PilzAdam dcd0b63f64 Dont load mods that have no entry in world.mt 2013-05-19 19:46:50 +02:00
Aaron Suen 6911a7d279 Clear custom player HUDs when emerging players. Fixes #711. 2013-05-10 19:25:50 -04:00
Kahrl 969d2b3eb1 Optional dependencies and properly handle mod name conflicts again 2013-05-03 23:58:22 +02:00
Kahrl be4cc306a5 Server: force block send of pointed_pos_under after predicted node place 2013-05-03 17:03:25 +02:00
kwolekr d3f0ce6224 Generalize hud_builtin_enable into hud_set_flags 2013-04-25 19:37:36 -04:00
Diego Martínez e703c5b81f Added support to disable built-in HUD elements 2013-04-24 17:28:00 +03:00
ShadowNinja 3d4d0cb574 Add option to not prepend "Server -!- " to messages sent with minetest.chat_send_player() 2013-04-23 09:47:08 +03:00
Diego Martínez 9894167bbf Added offset support for HUD items 2013-04-23 09:34:11 +03:00
Diego Martínez 7c37b1891a Added support for alignment in HUD items 2013-04-23 09:34:10 +03:00
kwolekr daddd37706 Fix findSpawnPos() 2013-04-21 15:39:34 -04:00
kwolekr 666aae3593 Split HUD code off to hud.cpp, make into a class, extensive Lua HUD modification 2013-04-18 02:19:31 -04:00
Jonathon Anderson 49f6e347f0 Lua HUD 2013-04-18 02:14:33 -04:00
sapier 04c3b17c78 fix various memory leaks 2013-04-09 02:23:07 -04:00
kwolekr 8ec3fc35c6 Add Mapgen V7, reorganize biomes 2013-04-07 00:50:21 -04:00