aboutsummaryrefslogtreecommitdiff
path: root/src/server.cpp
Commit message (Expand)AuthorAge
...
* Pass pointed_thing to on_punch and minetest.register_on_punchnode callbacksShadowNinja2014-01-23
* Allow vertical axis particle rotation constraintkhonkhortisan2014-01-13
* Fixed minetest reliable udp implementation (compatible to old clients)sapier2014-01-10
* Revert "Improve (re)spawn, add cache_block_before_spawn and max_spawn_height ...ShadowNinja2014-01-06
* Send long announce as POST, show OS in useragentproller2014-01-07
* Initialize world before creating BanManager and RollbackManagerShadowNinja2013-12-30
* Replace SimpleThread by JThread now implementing same featuressapier2013-12-15
* Update mapgen params in ServerMap after Mapgen initkwolekr2013-12-14
* Rewrite client media download and support hash-based remote downloadKahrl2013-12-13
* Add 'on_prejoinplayer' callbackkaeza2013-12-12
* Improve (re)spawn, add cache_block_before_spawn and max_spawn_height settingssweetbomber2013-12-05
* Cleanup jthread and fix win32 buildsapier2013-12-01
* Add minetest.swap_nodeNovatux2013-11-30
* Add a callback: minetest.register_on_craft(itemstack, player,Novatux2013-11-01
* Masterserver updateproller2013-10-18
* Show git hash in version string at top left corner of windowKahrl2013-09-28
* Fix some warnings and other minor detailskwolekr2013-09-16
* Always use builtin JThread librarykwolekr2013-09-15
* Use player:set_hotbar_image() instead of hardcoded hotbar.pngPilzAdam2013-09-05
* Server::ProcessData(): call getBanName once instead of twice (#639)Ilya2013-09-03
* Send player damage to all clients and apply [brightenPilzAdam2013-08-17
* Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenuKahrl2013-08-14
* Don't freak out when a client sends multiple TOSERVER_INIT packets; also log ...Perttu Ahola2013-08-08
* Clean up server's log messages and give a better error to client when its pla...Perttu Ahola2013-08-06
* Add texture pack selection to main menuNovatux2013-08-04
* Fix server getting completely choked up on even a little of DoSPerttu Ahola2013-08-04
* Allow mods to listen to cheat detections using minetest.register_on_cheat()Perttu Ahola2013-08-04
* Fix anticheatPerttu Ahola2013-08-03
* Weather backward compatibilityproller2013-08-02
* Dont announce server in singleplayerproller2013-07-27
* Cosmetic player info changesproller2013-07-24
* Add set_breath and get_breath to lua API.RealBadAngel2013-07-20
* Masterserver mods announse, ipv6, better curl errorsproller2013-07-13
* Disallow the name 'singleplayer' in a multiplayer serverPilzAdam2013-07-12
* Add Lua on_mapgen_init callback, and minetest.set_mapgen_params APIkwolekr2013-06-27
* Math mapgen fix, ip show on connect, pathfinder segfault fixproller2013-06-23
* Add support for IPv6proller2013-06-23
* Tweak IDropAction restriction handling in server.cppKahrl2013-06-16
* Add ObjectRef.hud_set_hotbar_itemcount and add TOCLIENT_HUD_SET_PARAMKahrl2013-05-26
* Move scriptapi to separate folder (by sapier)sapier2013-05-25
* Dont load mods that have no entry in world.mtPilzAdam2013-05-19
* Clear custom player HUDs when emerging players. Fixes #711.Aaron Suen2013-05-10
* Optional dependencies and properly handle mod name conflicts againKahrl2013-05-03
* Server: force block send of pointed_pos_under after predicted node placeKahrl2013-05-03
* Generalize hud_builtin_enable into hud_set_flagskwolekr2013-04-25
* Added support to disable built-in HUD elementsDiego Martínez2013-04-24
* Add option to not prepend "Server -!- " to messages sent with minetest.chat_s...ShadowNinja2013-04-23
* Added offset support for HUD itemsDiego Martínez2013-04-23
* Added support for alignment in HUD itemsDiego Martínez2013-04-23
* Fix findSpawnPos()kwolekr2013-04-21
hl opt">(pos); } // If object has moved less than this and data has not changed, // saving to disk may be omitted virtual float getMinimumSavedMovement() { return 2.0*BS; } virtual bool isPeaceful(){return true;} virtual std::string getDescription(){return "SAO";} /* Step object in time. Messages added to messages are sent to client over network. send_recommended: True at around 5-10 times a second, same for all objects. This is used to let objects send most of the data at the same time so that the data can be combined in a single packet. */ virtual void step(float dtime, bool send_recommended){} /* The return value of this is passed to the client-side object when it is created */ virtual std::string getClientInitializationData(){return "";} /* The return value of this is passed to the server-side object when it is created (converted from static to active - actually the data is the static form) */ virtual std::string getStaticData() { assert(isStaticAllowed()); return ""; } /* Return false in here to never save and instead remove object on unload. getStaticData() will not be called in that case. */ virtual bool isStaticAllowed() const {return true;} // Returns tool wear virtual int punch(v3f dir, const ToolCapabilities *toolcap=NULL, ServerActiveObject *puncher=NULL, float time_from_last_punch=1000000) { return 0; } virtual void rightClick(ServerActiveObject *clicker) {} virtual void setHP(s16 hp) {} virtual s16 getHP() const { return 0; } virtual void setArmorGroups(const ItemGroupList &armor_groups) {} virtual ObjectProperties* accessObjectProperties() { return NULL; } virtual void notifyObjectPropertiesModified() {} // Inventory and wielded item virtual Inventory* getInventory() { return NULL; } virtual const Inventory* getInventory() const { return NULL; } virtual InventoryLocation getInventoryLocation() const { return InventoryLocation(); } virtual void setInventoryModified() {} virtual std::string getWieldList() const { return ""; } virtual int getWieldIndex() const { return 0; } virtual ItemStack getWieldedItem() const; virtual bool setWieldedItem(const ItemStack &item); /* Number of players which know about this object. Object won't be deleted until this is 0 to keep the id preserved for the right object. */ u16 m_known_by_count; /* - Whether this object is to be removed when nobody knows about it anymore. - Removal is delayed to preserve the id for the time during which it could be confused to some other object by some client. - This is set to true by the step() method when the object wants to be deleted. - This can be set to true by anything else too. */ bool m_removed; /* This is set to true when an object should be removed from the active object list but couldn't be removed because the id has to be reserved for some client. The environment checks this periodically. If this is true and also m_known_by_count is true, object is deleted from the active object list. */ bool m_pending_deactivation; /* Whether the object's static data has been stored to a block */ bool m_static_exists; /* The block from which the object was loaded from, and in which a copy of the static data resides. */ v3s16 m_static_block; /* Queue of messages to be sent to the client */ Queue<ActiveObjectMessage> m_messages_out; protected: // Used for creating objects based on type typedef ServerActiveObject* (*Factory) (ServerEnvironment *env, v3f pos, const std::string &data); static void registerType(u16 type, Factory f); ServerEnvironment *m_env; v3f m_base_position; private: // Used for creating objects based on type static core::map<u16, Factory> m_types; }; #endif