aboutsummaryrefslogtreecommitdiff
path: root/src/script
Commit message (Expand)AuthorAge
* Prepare Protocol v25 init & authentication.Loic Blot2015-03-13
* lua_api/l_mapgen: Fix overlapping areas of minetest.generate_ores/decorationsparamat2015-03-11
* Don't use luaL_checkstring to read node names, it's only for argumentsShadowNinja2015-03-07
* For usages of assert() that are meant to persist in Release builds (when NDEB...Craig Robbins2015-03-07
* l_get_modnames: Compare using std::sort instead of a custom function which do...Loic Blot2015-03-05
* Fix issue #2441: crash on respawn, since a conversion std::list to std::vecto...Loic Blot2015-03-05
* Performance improvement: Use std::list instead of std::vector for request_med...Loic Blot2015-03-05
* We always know playerSAO when calling SendInventory. Using it instead of sear...Loic Blot2015-03-04
* Send Inventory packet on event, don't check it at each AsyncRunStep.Loic Blot2015-03-04
* Send Breath packet on event, don't check it at each AsyncRunStepLoic Blot2015-03-03
* Send Player HP when setHP (or a setHP caller) is called instead of looping an...Loic Blot2015-03-03
* Change find_surface_nodes_in_area to find_nodes_in_area_under_airCraig Robbins2015-02-27
* Add find_surface_nodes_in_area LUA call which permit to only get the nodes wh...Loic Blot2015-02-27
* Biome API: Re-calculate biome at every surface in a mapchunk columnparamat2015-02-26
* Disallow object:remove() if the object is a playerKahrl2015-02-23
* Server: announce MIN/MAX protocol version supported to serverlist. Client: ch...est312015-02-18
* Fix unused (and so, broken) enable_rollback_recording. This option must be re...Loic Blot2015-02-18
* SAO work: ActiveObject types & SAO cleanup * Replace u8 types with ActiveObje...Loic Blot2015-02-17
* Performance Improvement: Use a cache which caches result for getFacePositions.Loic Blot2015-02-16
* Fix .zip extraction (mod store)ngosang2015-02-12
* Reduce gettext wide/narrow and string/char* conversionsShadowNinja2015-02-05
* Fix all warnings and remove -Wno-unused-but-set cflagkwolekr2015-01-18
* Reorganize supported video driver query mechanismskwolekr2015-01-18
* Add ability to delete MapBlocks from mapkwolekr2015-01-15
* Performance fixes.onkrot2015-01-13
* Fix direction property of HUDrubenwardy2015-01-07
* Shorten ManualMapVoxelManipulator to MMVManipkwolekr2015-01-05
* Optionally specify propagateSunlight area in calcLightingkwolekr2015-01-05
* Exclude vertical mapblock borders when setting lightkwolekr2015-01-04
* Add minetest.generate_ores() and minetest.generate_decorations()kwolekr2015-01-04
* Remove freezemelt (the remainder of proller nonsense)kwolekr2015-01-04
* Add warning about using deprecated fields in Mapgen API and update docskwolekr2015-01-04
* LuaVoxelManip: Error when given out-of-bounds areakwolekr2015-01-04
* Lighting: Fix nearly all issueskwolekr2015-01-04
* Replace instances of height_min/height_max with y_min/y_max to remove ambiguitykwolekr2014-12-30
* Decoration: Fix default parameter valueskwolekr2014-12-30
* Add core.get_mapgen_names() to Main Menu API (and use it)kwolekr2014-12-29
* Expose mapgen parameters on scripting initkwolekr2014-12-29
* LuaVoxelManip: Remove blank allocatorkwolekr2014-12-29
* LuaItemStack: Fix and document behavior of set_name, set_count, set_wear, set...kwolekr2014-12-28
* Decoration: Add height_min and height_max parameterskwolekr2014-12-28
* Biome API: Add shore top and shore filler nodes, underwater node, water top n...paramat2014-12-28
* Ore: Add Vein ore typekwolekr2014-12-28
* Ore: Add Blob ore typekwolekr2014-12-28
* LuaVoxelManip: Add option to allocate blank datakwolekr2014-12-27
* Set fallback content if resolving content vector requires everythingkwolekr2014-12-27
* Redefine NodeResolver interface and replace with callback mechanismkwolekr2014-12-27
* Expose mapgen chunksize in on_mapgen_init callbackskwolekr2014-12-14
* LuaPerlinNoiseMap: Fix 3d noise safety checkkwolekr2014-12-12
* Add minetest.clear_registered_decorations() and clear_registered_ores()kwolekr2014-12-12
opt">); float getYaw(); void setTextureMod(const std::string &mod); void setSprite(v2s16 p, int num_frames, float framelength, bool select_horiz_by_yawpitch); std::string getName(); private: std::string getPropertyPacket(); void sendPosition(bool do_interpolate, bool is_movement_end); std::string m_init_name; std::string m_init_state; bool m_registered; struct ObjectProperties m_prop; s16 m_hp; v3f m_velocity; v3f m_acceleration; float m_yaw; ItemGroupList m_armor_groups; bool m_properties_sent; float m_last_sent_yaw; v3f m_last_sent_position; v3f m_last_sent_velocity; float m_last_sent_position_timer; float m_last_sent_move_precision; bool m_armor_groups_sent; }; /* PlayerSAO needs some internals exposed. */ class PlayerSAO : public ServerActiveObject { public: PlayerSAO(ServerEnvironment *env_, Player *player_, u16 peer_id_, const std::set<std::string> &privs, bool is_singleplayer); ~PlayerSAO(); u8 getType() const { return ACTIVEOBJECT_TYPE_PLAYER; } u8 getSendType() const { return ACTIVEOBJECT_TYPE_GENERIC; } std::string getDescription(); /* Active object <-> environment interface */ void addedToEnvironment(); void removingFromEnvironment(); bool isStaticAllowed() const; bool unlimitedTransferDistance() const; std::string getClientInitializationData(); std::string getStaticData(); void step(float dtime, bool send_recommended); void setBasePosition(const v3f &position); void setPos(v3f pos); void moveTo(v3f pos, bool continuous); /* Interaction interface */ int punch(v3f dir, const ToolCapabilities *toolcap, ServerActiveObject *puncher, float time_from_last_punch); void rightClick(ServerActiveObject *clicker); s16 getHP() const; void setHP(s16 hp); void setArmorGroups(const ItemGroupList &armor_groups); ObjectProperties* accessObjectProperties(); void notifyObjectPropertiesModified(); /* Inventory interface */ Inventory* getInventory(); const Inventory* getInventory() const; InventoryLocation getInventoryLocation() const; void setInventoryModified(); std::string getWieldList() const; int getWieldIndex() const; void setWieldIndex(int i); /* PlayerSAO-specific */ void disconnected(); void createCreativeInventory(); Player* getPlayer() { return m_player; } u16 getPeerID() const { return m_peer_id; } v3f getLastGoodPosition() const { return m_last_good_position; } float resetTimeFromLastPunch() { float r = m_time_from_last_punch; m_time_from_last_punch = 0.0; return r; } void updatePrivileges(const std::set<std::string> &privs, bool is_singleplayer) { m_privs = privs; m_is_singleplayer = is_singleplayer; } private: std::string getPropertyPacket(); Player *m_player; u16 m_peer_id; Inventory *m_inventory; v3f m_last_good_position; float m_last_good_position_age; float m_time_from_last_punch; int m_wield_index; bool m_position_not_sent; ItemGroupList m_armor_groups; bool m_armor_groups_sent; bool m_properties_sent; struct ObjectProperties m_prop; // Cached privileges for enforcement std::set<std::string> m_privs; bool m_is_singleplayer; public: // Some flags used by Server bool m_teleported; bool m_inventory_not_sent; bool m_hp_not_sent; bool m_wielded_item_not_sent; }; #endif