aboutsummaryrefslogtreecommitdiff
path: root/src/script/common/c_content.cpp
Commit message (Expand)AuthorAge
...
* Make some maps unordered to improve performanceLoic Blot2016-10-05
* Make getStackMax return the correct maximal stack sizeSmallJoker2016-09-08
* Fixes for compiling with a newer (system) jsoncpp (#4429)Rogier-52016-08-10
* Allow nodes to specify which sides to connect to.Auke Kok2016-03-12
* Nodebox: Allow nodeboxes to "connect"Auke Kok2016-03-12
* Allow per-tiles culling.Auke Kok2016-01-20
* Show infotext with description for item entitiesRealBadAngel2016-01-18
* Liquids: Flow into and destroy 'floodable' nodesparamat2016-01-07
* Revert "Add support for using arbitrary meshes as items"Sapier2015-12-29
* Add support for using arbitrary meshes as itemsSapier2015-12-29
* Fix lua object:get_properties() being brokenSapier2015-12-21
* Fix missing popest312015-12-20
* Add support for limiting rotation of automatic face movement dir entitysSapier2015-12-19
* Add option to give every object a nametagBlockMen2015-12-15
* Add support for audio feedback if placing node failedBlockMen2015-11-07
* Add option to disable backface culling for modelsBlockMen2015-10-25
* Use warningstream for deprecated field messages and refactor log_deprecatedShadowNinja2015-10-15
* Fix tiling issues for PLANTLIKE and FIRELIKE with FSAARealBadAngel2015-08-05
* Fix relief mapping issuesRealBadAngel2015-07-16
* Fix code style from recent commits and add misc. optimizationskwolekr2015-07-02
* Add some missing getter functions to the lua APITeTpaAka2015-05-28
* SAPI: Accept either ARGB8 table or ColorString to specify colorskwolekr2015-05-16
* Add 'persistence' alias for Lua noiseparams and validate more vector parameterskwolekr2015-04-19
* Don't use luaL_checkstring to read node names, it's only for argumentsShadowNinja2015-03-07
* Remove freezemelt (the remainder of proller nonsense)kwolekr2015-01-04
* Move get_schematic and read_schematic to l_mapgen.cppkwolekr2014-12-10
* Remove get_noiseparams function. read_noiseparams should be used from now onkwolekr2014-12-10
* Add flags and lacunarity as new noise parameterskwolekr2014-12-07
* Schematics: Fix minetest.place_schematic() when defined by a Lua tablekwolekr2014-12-06
* Don't corrupt stepheight when setting other propertiesCiaran Gultnieks2014-11-26
* Add option 'eased' to NoiseParamsSmallJoker2014-11-13
* Add Generator Element Management frameworkkwolekr2014-11-12
* Split up mapgen.cppkwolekr2014-11-01
* Custom collision boxes node property.RealBadAngel2014-10-19
* Add meshnode drawtype.RealBadAngel2014-10-18
* Use "core" namespace internallyShadowNinja2014-05-08
* Remove lua_State parameter from LuaError::LuaErrorShadowNinja2014-03-15
* Revert "Make sure we get a stacktrace for as many lua errors as possible"ShadowNinja2014-03-15
* Make sure we get a stacktrace for as many lua errors as possibleSfan52014-03-15
* Update set_mapgen_params and set_gen_notify Lua API to use new flag formatkwolekr2014-03-08
* Add minetest.set_noiseparam_defaults() Lua APIkwolekr2014-02-15
* Define strlcpy on platforms that do not have itkwolekr2014-02-09
* Add capability to read table flag fields from Lua APIkwolekr2014-02-09
* Make flag strings clear specified flag with 'no' prefixkwolekr2014-02-08
* Schematic: Read slice probability table from schematic descriptorskwolekr2014-01-19
* Add maximum recursion depth to read_json_valueShadowNinja2014-01-11
* Rename get_json_value to read_json_valueShadowNinja2014-01-11
* Fix InventoryList reading orderShadowNinja2013-12-30
* Don't throw a error when writing JSON failsShadowNinja2013-12-18
* Add 'minetest.write_json'ShadowNinja2013-12-18
s="hl kwb">void update(LocalPlayer* player, f32 frametime, f32 busytime, f32 tool_reload_ratio); // Update render distance void updateViewingRange(); // Start digging animation // Pass 0 for left click, 1 for right click void setDigging(s32 button); // Replace the wielded item mesh void wield(const ItemStack &item); // Draw the wielded tool. // This has to happen *after* the main scene is drawn. // Warning: This clears the Z buffer. void drawWieldedTool(irr::core::matrix4* translation=NULL); // Toggle the current camera mode void toggleCameraMode() { if (m_camera_mode == CAMERA_MODE_FIRST) m_camera_mode = CAMERA_MODE_THIRD; else if (m_camera_mode == CAMERA_MODE_THIRD) m_camera_mode = CAMERA_MODE_THIRD_FRONT; else m_camera_mode = CAMERA_MODE_FIRST; } // Set the current camera mode inline void setCameraMode(CameraMode mode) { m_camera_mode = mode; } //read the current camera mode inline CameraMode getCameraMode() { return m_camera_mode; } Nametag *addNametag(scene::ISceneNode *parent_node, const std::string &nametag_text, video::SColor nametag_color, const v3f &pos); void removeNametag(Nametag *nametag); const std::list<Nametag *> &getNametags() { return m_nametags; } void drawNametags(); inline void addArmInertia(f32 player_yaw); private: // Nodes scene::ISceneNode *m_playernode = nullptr; scene::ISceneNode *m_headnode = nullptr; scene::ICameraSceneNode *m_cameranode = nullptr; scene::ISceneManager *m_wieldmgr = nullptr; WieldMeshSceneNode *m_wieldnode = nullptr; // draw control MapDrawControl& m_draw_control; Client *m_client; // Absolute camera position v3f m_camera_position; // Absolute camera direction v3f m_camera_direction; // Camera offset v3s16 m_camera_offset; v2f m_wieldmesh_offset = v2f(55.0f, -35.0f); v2f m_arm_dir; v2f m_cam_vel; v2f m_cam_vel_old; v2f m_last_cam_pos; // Field of view and aspect ratio stuff f32 m_aspect = 1.0f; f32 m_fov_x = 1.0f; f32 m_fov_y = 1.0f; // View bobbing animation frame (0 <= m_view_bobbing_anim < 1) f32 m_view_bobbing_anim = 0.0f; // If 0, view bobbing is off (e.g. player is standing). // If 1, view bobbing is on (player is walking). // If 2, view bobbing is getting switched off. s32 m_view_bobbing_state = 0; // Speed of view bobbing animation f32 m_view_bobbing_speed = 0.0f; // Fall view bobbing f32 m_view_bobbing_fall = 0.0f; // Digging animation frame (0 <= m_digging_anim < 1) f32 m_digging_anim = 0.0f; // If -1, no digging animation // If 0, left-click digging animation // If 1, right-click digging animation s32 m_digging_button = -1; // Animation when changing wielded item f32 m_wield_change_timer = 0.125f; ItemStack m_wield_item_next; CameraMode m_camera_mode = CAMERA_MODE_FIRST; f32 m_cache_fall_bobbing_amount; f32 m_cache_view_bobbing_amount; f32 m_cache_fov; bool m_arm_inertia; std::list<Nametag *> m_nametags; };