Commit Graph

368 Commits

Author SHA1 Message Date
Perttu Ahola 2dc9a0c724 Fix player double damage 2011-12-02 11:16:51 +02:00
Perttu Ahola 09010410cf Print out PROTOCOL_VERSIONs if server is incompatible with client 2011-12-02 01:24:54 +02:00
Perttu Ahola 9d67037570 Don't send objects or map data before definitions have been sent 2011-12-02 01:18:25 +02:00
Perttu Ahola 08a10b8a6a Remove stuff made obsolete by making players more ActiveObject-like and raise protocol version number by one (because it is not compatible at all anymore) 2011-12-01 23:55:57 +02:00
Perttu Ahola af32240545 Players are more like objects + related stuff 2011-12-01 23:33:48 +02:00
Perttu Ahola ee0d3bacbc Player-is-SAO WIP 2011-12-01 18:23:58 +02:00
Kahrl 2ca00fa585 Fix processing of the default_password setting. It is now actually used as the plaintext password for new users. Also add /setpassword and /clearpassword server commands that can be used by admins with the PRIV_PASSWORD privilege, and update the /help message. 2011-12-01 12:06:39 +02:00
Perttu Ahola 347216d654 Reworked the inventory move handling code, hopefully fixed more problems than caused 2011-11-30 19:49:34 +02:00
Perttu Ahola e109ed5cef Proper player inventory and hp modification tracking and sending accordingly 2011-11-29 23:18:20 +02:00
Perttu Ahola 4bcff65ad0 Better version match fail messages from server 2011-11-29 22:23:03 +02:00
Perttu Ahola 2a610b011a Handle items with m_count==0 sanely when placing 2011-11-29 21:05:53 +02:00
Kahrl d6b30dd3a5 CraftItem rework and Lua interface 2011-11-29 19:13:58 +02:00
Perttu Ahola 705f142b8d GenericNodeMetadata and an example furnace 2011-11-29 19:13:57 +02:00
Perttu Ahola 0f2b932e92 Initial NodeMetaRef stuff 2011-11-29 19:13:56 +02:00
Perttu Ahola 842eb5da28 Replace old active block random node modifying things with actual ActiveBlockModifiers 2011-11-29 19:13:56 +02:00
Perttu Ahola 05df2ee8a4 Add chat message callback and send functions 2011-11-29 19:13:56 +02:00
Perttu Ahola c449e5f20a Use log_deregister_thread in EmergeThread 2011-11-29 19:13:56 +02:00
Perttu Ahola 2e42391b86 Fix mod dependency sort 2011-11-29 19:13:55 +02:00
Perttu Ahola fd8b9a3a44 Warn about unsatisfied dependencies 2011-11-29 19:13:55 +02:00
Perttu Ahola 5c1cb01936 Make blocks to be loaded from disk when the active block area reaches them 2011-11-29 19:13:55 +02:00
Perttu Ahola a8a82e0b21 Sort mods by dependencies defined by modpath/depends.txt in each mod (not mandatory) 2011-11-29 19:13:55 +02:00
Perttu Ahola 218b626016 Fix and tune player movement checks (make them very loose) 2011-11-29 19:13:55 +02:00
Kahrl f42c57d9a8 Add IDropAction and related stuff 2011-11-29 19:13:54 +02:00
Perttu Ahola b2ccbdffc1 Make map generator as much threaded as possible (not much benefit with current generator because of small generator chunk size (a single MapBlock)) 2011-11-29 19:13:54 +02:00
Perttu Ahola 769cc9879f Add on_generated hook 2011-11-29 19:13:54 +02:00
Perttu Ahola 0dbb31afeb Improve player movement speed checking 2011-11-29 19:13:54 +02:00
Perttu Ahola 1bfc3c1eb9 Player movement speed and node access distance checking 2011-11-29 19:13:54 +02:00
Perttu Ahola 945d01fd9e on_newplayer and on_respawnplayer callbacks 2011-11-29 19:13:53 +02:00
Perttu Ahola 77337271fc Remove give_initial_stuff 2011-11-29 19:13:52 +02:00
Kahrl c1479a2732 Add node definitions in Lua and do not use content_mapnode_init anymore (except in test.cpp) 2011-11-29 19:13:52 +02:00
Perttu Ahola 61ffe1eac4 builtin.lua 2011-11-29 19:13:52 +02:00
Perttu Ahola 9e7ad1e2aa Add object reference to Lua on_place/dig/punchnode parameters 2011-11-29 19:13:52 +02:00
Perttu Ahola ae9f183cda Fix "warning: comparison between signed and unsigned integer expressions" 2011-11-29 19:13:52 +02:00
Perttu Ahola fdf6eecd59 Make map generator more responsive 2011-11-29 19:13:51 +02:00
Perttu Ahola 6a8f9135de Store metadata as metadata name in node definition 2011-11-29 19:13:51 +02:00
Perttu Ahola 704d8a62bf Set block modified flag when node metadata inventory is modified 2011-11-29 19:13:50 +02:00
Perttu Ahola 941176cd65 Default to saving stuff more often to minimize lag caused by a single save 2011-11-29 19:13:50 +02:00
Perttu Ahola 1b765b9740 Add reason parameter to setModified and print it out to verbosestream when saving block 2011-11-29 19:13:49 +02:00
Perttu Ahola 0ce0c8fcfb Improve LuaEntity velocity/acceleration handling (by kahrl); implement staticdata interface to Lua 2011-11-29 19:13:49 +02:00
Perttu Ahola cc03718d3c Node place/dig Lua callbacks 2011-11-29 19:13:49 +02:00
Perttu Ahola 9d5b458479 Crafting definition in scripts 2011-11-29 19:13:48 +02:00
Perttu Ahola df8346ef4d Do not expose CONTENT_* stuff in content_mapnode.h and use a name converter wrapper in old code 2011-11-29 19:13:47 +02:00
Perttu Ahola c0f6395cf0 Node definition names 2011-11-29 19:13:46 +02:00
Perttu Ahola 26abf6fd82 Cut down content transfer verbosity 2011-11-29 19:13:45 +02:00
Perttu Ahola 7696a38543 Improve loading screen and protocol 2011-11-29 19:13:45 +02:00
Perttu Ahola 6da8cb00e2 Node definitions transfer 2011-11-29 19:13:44 +02:00
Perttu Ahola eed727c61b Completely generalized mesh generation; ContentFeatures serialization 2011-11-29 19:13:44 +02:00
Perttu Ahola cf6e22e9a6 Better node texture generation 2011-11-29 19:13:43 +02:00
Perttu Ahola 45fc45a49e Sending of textures WIP 2011-11-29 19:13:43 +02:00
Perttu Ahola e71744b918 Modify mod and texture directory hierarchies 2011-11-29 19:13:43 +02:00
Perttu Ahola 9e1c4533b8 Move tool definitions to script 2011-11-29 19:13:43 +02:00
Perttu Ahola 4b8e4dae58 Tool definition transfer to client 2011-11-29 19:13:42 +02:00
Perttu Ahola c6fd2986d4 GameDef compiles 2011-11-29 19:13:42 +02:00
Perttu Ahola abceeee92f Create framework for getting rid of global definitions of node/tool/item/whatever types 2011-11-29 19:13:41 +02:00
Perttu Ahola 64996422c0 Move ContentFeatures to mapnode_contentfeatures.{h,cpp} and clean stuff 2011-11-29 19:13:40 +02:00
Perttu Ahola 1320d07068 Scripting WIP: dynamic object stuff 2011-11-29 19:13:40 +02:00
Perttu Ahola 0b97ad8384 ServerRemotePlayer implements ServerActiveObject 2011-11-29 19:13:40 +02:00
Perttu Ahola 75a0ca6bd6 Scripting WIP 2011-11-29 19:13:40 +02:00
Perttu Ahola f145d498a6 Scripting WIP 2011-11-29 19:13:39 +02:00
Perttu Ahola a6a1e6ed1a random scripting work-in-progress 2011-11-29 19:13:39 +02:00
Perttu Ahola bfc68d3151 Scripting WIP 2011-11-29 19:13:38 +02:00
Perttu Ahola ee8b6d3444 Move images to data/textures and fix some path stuff; hope that installation still works 2011-11-29 19:11:04 +02:00
Perttu Ahola 7372282a72 Better spawn position finding and checking 2011-11-13 03:17:42 +02:00
Kahrl 1c98ec94da Make Connection::Receive return the data via a SharedBuffer reference, so the caller doesn't have to choose the right buffer size in advance.
Conflicts:

	src/test.cpp
2011-11-07 11:21:42 +02:00
Perttu Ahola 4b6138e69b Improve Connection with threading and some kind of congestion control 2011-10-20 23:04:09 +03:00
Perttu Ahola 3a06fb8831 Fix and tune block sending 2011-10-19 02:17:23 +03:00
Perttu Ahola 78f4142f4f Add /clearobjects 2011-10-18 00:01:50 +03:00
Perttu Ahola 2419d0029a Some more profiler stuff to get the hang on what really uses CPU 2011-10-16 22:39:35 +03:00
Perttu Ahola b8f2dcea4d Improve debug profiler usage for investigating CPU usage of server 2011-10-16 21:16:44 +03:00
Perttu Ahola 07d000cc54 When granting or revoking privileges, notify the target player too 2011-10-16 20:03:43 +03:00
Perttu Ahola 143dce6672 When player times out, log the action as a timeout rather than regular quitting 2011-10-16 19:38:56 +03:00
Perttu Ahola 96b2d1fd29 Check NULL pointer properly in some new code trying to log new stuff 2011-10-16 18:50:30 +03:00
Perttu Ahola 0bf533f753 Switch more stuff to use the logging thing and fix segfault on player leave from server as introduced in a previous switch-to-logging commit 2011-10-16 16:28:12 +03:00
Perttu Ahola b65a5aceb0 Use the logger; also, default to not showing much crap in console. Use --info-on-stderr to enable crap. 2011-10-16 14:57:53 +03:00
Perttu Ahola 94dfececf6 strict_protocol_version_checking setting; PROTOCOL_VERSION in clientserver.h; clean up defaultsettings.cpp and minetest.conf.example 2011-10-15 15:02:28 +03:00
Perttu Ahola 74febd5c31 Handle death and respawn better 2011-10-15 14:46:59 +03:00
Perttu Ahola 5341bf59c2 Improve mobv2 2011-10-15 12:17:21 +03:00
Perttu Ahola 43a28f04fa mobv2 2011-10-15 02:28:57 +03:00
Perttu Ahola 080002f8ed Lock mutex when accessing m_env in Server::~Server 2011-10-14 12:39:25 +03:00
Perttu Ahola 9e46cbf7ea Header file tweaking; mainly for speed 2011-10-12 13:53:38 +03:00
Perttu Ahola b60b58b627 Saner block modification flag operation for not saving everything always 2011-10-12 10:53:37 +03:00
Perttu Ahola a7833cca22 Merge remote-tracking branch 'marktraceur/master' 2011-09-26 22:41:06 +03:00
Perttu Ahola 061d4b4202 Merge branch 'view_bobbing_and_vielded_tool' 2011-09-26 15:10:02 +03:00
Perttu Ahola b9e680d06c Server user limit configuration option 2011-09-26 11:57:51 +03:00
Perttu Ahola 0ccc0ac927 Merge remote-tracking branch 'darkrose/master' 2011-09-26 11:57:28 +03:00
Joshua Beck ae561d705f Fixed null pointer dereference errors found by cppcheck 2011-09-24 02:11:43 -05:00
Mark Holmquist 85f119e1e6 Adding (most) of the sapling functionality. It has yet to work, since MEET_OTHER was not implemented at the time of this commit. Hopefully it will work when merged with celeron's latest. 2011-09-23 18:13:53 -07:00
Perttu Ahola bdf54908aa Make client report a newer version number to the server than 2011-07-31 does and make the server enforce it 2011-09-22 20:47:47 +03:00
darkrose 582e450bad added locking chests - clean patch 2011-09-22 19:11:48 +10:00
Kahrl acfb2bb8bc Revert some changes that could lead to slower map transfer and increaed network load. 2011-09-16 18:03:58 +02:00
Kahrl e4cb004460 trying something else... also replaced M_PI by PI everywhere 2011-09-08 16:10:44 +02:00
Kahrl baf7da9d4a Collected and moved existing camera infrastructure from game.cpp to camera.cpp and camera.h. Introduced configuration settings 'fov' which chooses the camera's (vertical) field of view and 'view_bobbing' which currently does nothing. Other code refactored to not expect the FOV to be a build time constant. 2011-09-08 01:08:47 +02:00
Perttu Ahola 87b9e5467d Merge remote-tracking branch 'queatz/furnace-is-not-out-nor-can-rat-escape' 2011-08-30 14:24:07 +03:00
JacobF 134e49cc8e Merged 2 branches because they relied on each other.
This one contains these changes from main c55:
* Adds a function to check if there is room for a specific item
* Using that, you can now pick up rats if you have a full inventory and a not full rat stack
* Furnace would cook only 1 item if that item used the last available result slot, now it will continue
* Furnace will say it's overloaded
* Furnace won't wait until the next step to start on the next item
 - This caused small fuels to cook slower than meant to
 - Also caused furnaces to say they were out of fuel after finishing the last fuel item
2011-08-25 19:27:50 -04:00
JacobF 2e82268a67 If a user doesn't have build rights, don't allow them to move items to and from their inventory 2011-08-23 22:08:09 -04:00
Perttu Ahola d4df20a913 if creative mode and player has no build privileges, cannot drop items. 2011-08-22 22:55:17 +03:00
Perttu Ahola 4acad897cf Fixed some protocol comment errors in clientserver.h and elsewhere
-- TOCLIENT_OBJECTDATA: peer ID field is missing
-- TOCLIENT_ACTIVE_OBJECT_REMOVE_ADD: added: init length should be u32, not u16
2011-08-22 22:04:46 +03:00
Perttu Ahola a99450ab72 Possibly fixed the extremely rare PeerNotFound loop bug.
See explanation in http://2pktfkt.de/irc/minetest-delta/2011-08-22.html
2011-08-22 21:27:11 +03:00
Giuseppe Bilotta da19aee307 Server now supports replies without prefix 2011-08-22 13:02:08 +02:00
Giuseppe Bilotta d2c0b4905a Defines for server command context flags 2011-08-22 13:02:08 +02:00
Giuseppe Bilotta 153f07fdfb Remove distinction between /# and / commands
No need to make the server command syntax more complicated than
necessary. If the need ever arise, we'll find some other way to
distinguish the client commands. Also, the /# syntax is deprecated and
will be made obsolete in time.
2011-08-22 13:02:08 +02:00
Perttu Ahola 29c9d3d5f4 Implemented MEET_OTHER 2011-08-16 12:23:19 +03:00
Perttu Ahola e40da2341c Fixed/extended/modified ban stuff to be good for inclusion 2011-08-12 13:11:27 +03:00
Constantin Wenger 5784c14ab7 added ipban support
commands:
/#ipban <nick>
/#ipunban <ip>
2011-08-12 03:37:18 +02:00
Giuseppe Bilotta 371af9c241 Notify other players of wielded item change 2011-08-11 15:22:36 +02:00
Giuseppe Bilotta ecd5c5f920 Clients inform server on wielded item
This is done with the new TOSERVER_PLAYERITEM message, that informs the
server on the index of the wielded item.
2011-08-11 15:22:36 +02:00
Giuseppe Bilotta c007d8219e Server should use the same eye position as the client 2011-08-11 15:22:35 +02:00
Perttu Ahola 19ea901cf2 Fixes a bug that made the server to deny non-empty passwords from players connecting the first time. 2011-07-31 15:51:24 +03:00
Perttu Ahola e0b8e66540 Fixed problem of server always receiving an empty password from the client 2011-07-31 15:32:45 +03:00
Perttu Ahola 756f8f88d4 Made stricter handling for old clients because now they are not compatible at all. 2011-07-31 02:27:26 +03:00
Perttu Ahola 8e1eacf3a8 Fixed handling of inventory in creative mode (normal inventory is not trashed anymore), fixed mese pick speed, added some forgotten stuff 2011-07-30 23:33:57 +03:00
Perttu Ahola f2051c9822 fix to the former 2011-07-30 20:10:16 +03:00
Perttu Ahola f8fca8ca5e easier notice on old version 2011-07-30 20:06:30 +03:00
Perttu Ahola 24a662705c Added network protocol version number in protocol 2011-07-30 20:02:17 +03:00
Perttu Ahola cdadbdbd17 Server configuration is now written when "/#setting whatever = whatever" is issued. 2011-07-30 19:49:42 +03:00
Perttu Ahola 9b294ffa7a Added message of the day and made it properly configurable using /#setting (not saved to config file yet) 2011-07-30 19:31:33 +03:00
Perttu Ahola 4b0c3e4357 Made picking items up in creative mode delete them (because they usually are in the inventory already anyway) 2011-07-30 19:05:25 +03:00
Perttu Ahola d62ae0e18b Rats are now eatable. Also made their selection box move smoothly. 2011-07-30 18:51:15 +03:00
Perttu Ahola 29d905f98a Added a mapblock analyzing function for debugging use and fixed remaining mapgen bugs 2011-07-24 12:09:33 +03:00
Perttu Ahola 90d793f8f3 extended content-type range 2011-07-23 16:55:26 +03:00
Perttu Ahola 71f5d4b344 Fixed objects being sometimes not able to be stored statically in a block when block has been unloaded 2011-07-01 21:04:40 +03:00
Perttu Ahola dd22ea051a map unloading is now a whole lot better 2011-06-27 00:27:17 +03:00
Perttu Ahola 3fccc67eb7 fixed block unloading from memory (a better fix coming next) 2011-06-26 21:53:11 +03:00
Perttu Ahola 5e3deed672 Added CPT_FACEDIR_SIMPLE calculation, finally, as figured out by spongie 2011-06-26 19:23:44 +03:00
Perttu Ahola 91cfbe2891 reorganized a lot of stuff and modified mapgen and objects slightly while doing it 2011-06-26 15:48:56 +03:00
Perttu Ahola c1ceabef71 added and commented out some debug output 2011-06-26 03:14:52 +03:00
Perttu Ahola bb940a946d even more code refactoring 2011-06-26 02:34:36 +03:00
Perttu Ahola f2c26e2014 moved map generator to separate source files 2011-06-25 18:12:41 +03:00
Perttu Ahola aed9e809a1 mapgen stuff 2011-06-25 16:32:09 +03:00
Perttu Ahola 7538b4c620 New map generator added (and SQLite, messed up the commits at that time...) (import from temporary git repo) 2011-06-25 04:25:14 +03:00
Perttu Ahola 5ac900ddd9 Changed MapBlockObjects to be never written anymore. Incremented version number. 2011-06-18 15:16:35 +03:00
Perttu Ahola da692355e8 Created and moved stuff to content_nodemeta.{h,cpp} 2011-06-18 00:46:50 +03:00
Perttu Ahola dc5319b6c9 Moved some mapnode content stuff from mapnode.{h,cpp} and digging property stuff from material.cpp to content_mapnode.{h,cpp} 2011-06-17 22:20:15 +03:00
Perttu Ahola c68f21214d made server to send map seed for testing 2011-06-05 21:06:54 +03:00
Perttu Ahola bf22dba687 removed a debug print that would flood a lot in some kind of a timeout 2011-06-02 20:09:30 +03:00
Perttu Ahola 51cf464f74 Fixed the password crash on Windows 2011-06-02 00:01:11 +03:00
Perttu Ahola bbead93c1a Reduced server CPU usage on NodeMetadata step()s. Also furnace now cooks while no players are near it. 2011-05-31 20:02:55 +03:00
celeron55 7740425085 Updated licenses of CiaranG's contributions to be in line with the new contribution policy and added a TODO note to server.cpp 2011-05-31 11:59:51 +03:00
Perttu Ahola db36771c63 auth stuff is now saved only when modified 2011-05-31 00:23:39 +03:00
Perttu Ahola 41f07328c8 removed some debug prints
...and added support for simple time usage profiling in the last one.
2011-05-31 00:16:58 +03:00
Perttu Ahola 223b379348 Reduced the CPU usage of the sent block selector algorithm 2011-05-31 00:15:43 +03:00
Perttu Ahola e81919c818 hopefully fixed the privilege problems
--HG--
extra : rebase_source : 9826d20176134a53ff232816a10407465d8c0f50
2011-05-29 22:34:04 +03:00
Perttu Ahola 63611932eb player passwords and privileges in world/auth.txt
--HG--
extra : rebase_source : 7260636295d9068fbeeddf4143c89f2b8a91446c
2011-05-29 21:11:16 +03:00
Perttu Ahola 12ca835e14 Merged CiaranG's fence and fixed two things 2011-05-24 20:13:21 +03:00
Ciaran Gultnieks c5e583e059 Added fences (but still needs an icon or something to display in inventory) 2011-05-24 17:52:04 +01:00
Ciaran Gultnieks 8bbc512fe5 Added 'shout' player privilege 2011-05-23 20:40:25 +01:00
Ciaran Gultnieks a9940c2ccf Allow default privileges for new players to be set in the server config 2011-05-22 23:56:57 +01:00
Ciaran Gultnieks a8a3271470 Added the ability to change your password (via pause menu)
--HG--
extra : rebase_source : e8ec407f60711d42d33be4811b2880088f617b5b
2011-05-22 21:09:12 +01:00
Perttu Ahola 0af5311538 Preliminary "active block" stuff + set up test code to grow grass. 2011-05-22 17:00:09 +03:00
Ciaran Gultnieks 52d857cf15 Passwords - a few corrections to the previous commit 2011-05-20 21:37:13 +01:00