aboutsummaryrefslogtreecommitdiff
path: root/src/localplayer.cpp
AgeCommit message (Collapse)Author
2016-03-14Fix player teleportation bug whilst sneakingHybridDog
Only set back position when sneaking if player wasn't teleported by adding and using a bool "got_teleported" to player it fixes #2876
2016-03-12Nodebox: Allow nodeboxes to "connect"Auke Kok
We introduce a new nodebox type "connected", and allow these nodes to have optional nodeboxes that connect it to other connecting nodeboxes. This is all done at scenedraw time in the client. The client will inspect the surrounding nodes and if they are to be connected to, it will draw the appropriate connecting nodeboxes to make those connections. In the node_box definition, we have to specify separate nodeboxes for each valid connection. This allows us to make nodes that connect only horizontally (the common case) by providing optional nodeboxes for +x, -x, +z, -z directions. Or this allows us to make wires that can connect up and down, by providing nodeboxes that connect it up and down (+y, -y) as well. The optional nodeboxes can be arrays. They are named "connect_top, "connect_bottom", "connect_front", "connect_left", "connect_back" and "connect_right". Here, "front" means the south facing side of the node that has facedir = 0. Additionally, a "fixed" nodebox list present will always be drawn, so one can make a central post, for instance. This "fixed" nodebox can be omitted, or it can be an array of nodeboxes. Collision boxes are also updated in exactly the same fashion, which allows you to walk over the upper extremities of the individual node boxes, or stand really close to them. You can also walk up node noxes that are small in height, all as expected, and unlike the NDT_FENCELIKE nodes. I've posted a screenshot demonstrating the flexibility at http://i.imgur.com/zaJq8jo.png In the screenshot, all connecting nodes are of this new subtype. Transparent textures render incorrectly, Which I don't think is related to this text, as other nodeboxes also have issues with this. A protocol bump is performed in order to be able to send older clients a nodeblock that is usable for them. In order to avoid abuse of users we send older clients a "full-size" node, so that it's impossible for them to try and walk through a fence or wall that's created in this fashion. This was tested with a pre-bump client connected against a server running the new protocol. These nodes connect to other nodes, and you can select which ones those are by specifying node names (or group names) in the connects_to string array: connects_to = { "group:fence", "default:wood" } By default, nodes do not connect to anything, allowing you to create nodes that always have to be paired in order to connect. lua_api.txt is updated to reflect the extension to the node_box API. Example lua code needed to generate these nodes can be found here: https://gist.github.com/sofar/b381c8c192c8e53e6062
2016-02-14Player::accelerateHorizontal/Vertical should be member of LocalPlayerLoic Blot
2016-01-29Don't pass non-const references to collision methodsest31
Non const references cause a lot of confusion with behaviour of code, and are disallowed by minetest style guide.
2015-11-08Fix misc. MinGW and Valgrind warningskwolekr
2015-11-03Only go fast in autorun if fast move is enabledest31
2015-10-26Fix jittering sounds on entities (fixes #2974)BlockMen
2015-08-15Fix sneaking (fixes #665 and #3045)BlockMen
2015-08-06Fix detection of sneaking nodegregorycu
This fixes bug 1551
2015-08-02Fix "bouncy" blocksMiner59
Before players "bounced" too high. Now, while still allowing to bounce, higher speed bounces are throttled.
2015-05-30Only retrieve always_fly_fast setting onceSmallJoker
2015-05-28Add some missing getter functions to the lua APITeTpaAka
ObjectRef: get_properties get_armor_groups get_animation get_attach get_bone_position Players: get_physics_override hud_get_hotbar_itemcount hud_get_hotbar_image hud_get_hotbar_selected_image get_sky get_day_night_ratio get_local_animation get_eye_offset Global: minetest.get_gen_notify minetest.get_noiseparams
2015-04-01Move globals from main.cpp to more sane locationsCraig Robbins
Move debug streams to log.cpp|h Move GUI-related globals to clientlauncher Move g_settings and g_settings_path to settings.cpp|h Move g_menuclouds to clouds.cpp|h Move g_profiler to profiler.cpp|h
2015-03-07For usages of assert() that are meant to persist in Release builds (when ↵Craig Robbins
NDEBUG is defined), replace those usages with persistent alternatives
2015-03-04ABMHandler and player_collisions use sequential read/write. Switch from ↵Loic Blot
std::list to std::vector * Also remove dead code Map::unloadUnusedData which is dead since a long time
2015-01-18Fix all warnings and remove -Wno-unused-but-set cflagkwolekr
2015-01-11Fix invalid stepheight increase calculation on androidsapier
2015-01-11Increase stepheight on android by 0.5 to smoothen movementsapier
2014-11-14Remove most exceptions from getNode() (and variants)Craig Robbins
2014-11-08Implement WieldMeshSceneNode which improves wield mesh renderingKahrl
- Don't create and cache an extruded mesh for every (non-node) item. Instead use a single one per image resolution. - For cubic nodes reuse a single wield mesh too - Improve lighting of the wielded item - Increase far value of wield mesh scene camera, fixes #1770 - Also includes some minor refactorings of Camera and GenericCAO.
2014-10-01Simplify player modification checksShadowNinja
2014-05-18Add support for interlaced polarized 3d screenssapier
Add (experimental) support for topbottom as well as sidebyside 3d mode
2014-04-19Bunch of small fixes (coding style, very unlikely errors, warning messages)sapier
2014-04-15Fix all warnings reported by clangSfan5
2014-04-13Reorder initialization of member variables to make GCC happyShadowNinja
2014-04-12Add player:set_eye_offset() by @MirceaKitsune and clean upBlockMen
2014-04-12Add third person viewBlockMen
2013-12-03Add sneak and sneak_glitch to set_physics_override()PilzAdam
2013-09-05Use player:set_hotbar_image() instead of hardcoded hotbar.pngPilzAdam
2013-05-19Dont teleport back if holding sneak when detaching/turn freemove offPilzAdam
2013-04-25Move player collisionbox to player classsapier
2013-04-11Swing the camera down when the player lands on the ground, based on the ↵MirceaKitsune
velocity the surface is hit with.
2013-04-05Dont allow fast move in water or ladder when aux1_descend is trueMirceaKitsune
2013-04-05Allow modifying movement speed, jump height and gravity per-player via the ↵MirceaKitsune
Lua API.
2013-04-03Fix camera "jumping" when attached and the parent goes too fastZeg9
2013-03-28Closed add object <-> object collision handlingsapier
2013-03-11Migrate to STL containers/algorithms.Ilya Zhuravlev
2013-02-24Update Copyright YearsSfan5
2013-02-24Change Minetest-c55 to MinetestPilzAdam
2013-02-14Improved Player PhysicsMirceaKitsune
2013-02-10Don't fall off nodes if sneaking with free_move on but without fly privilegesShadowNinja
2013-01-07Add a setting to enable always flying fastPilzAdam
2012-12-27Use aux1 to move fast when flyingPilzAdam
2012-12-17Fix falling damage when not flyingPilzAdam
2012-12-11Dont sneak while flyingPilzAdam
2012-12-11Only fly through walls in noclip mode wich requires the noclip privilegePilzAdam
2012-12-02Don't send player position from client to server if the player hasn't movedMirceaKitsune
2012-11-28Fix head shifting downards in glass, nodeboxes...Calinou
2012-11-25Fix more things I forgot for attached players. Such players will now ↵MirceaKitsune
properly see themselves moving when attached, and the server will read their position accordingly Fix attached players being able to bob their view and generate foostep sounds by pressing a movement key (running in place)
2012-11-25Update attachments at the ending of the addToScene function for parents. And ↵MirceaKitsune
with this... *drum roll* Client-side attachments are at last functional and stick visibly. Fix the last segmentation fault (apparently). So far attachments seem to be fully functional, although removing the parent causes children to go to origin 0,0,0 and possibly still cause such a fault (though this should already be addressed) Fix a bug in falling code where entities get stuck Also check if the parent has been removed server-side, and detach the child if so. Fixes children going to origin 0,0,0 when their parent is removed. Unset all attachment properties when permanently detaching (on both the client and server). Also store less data we don't need Create a separate function for detaching, and also update lua api documentation When a child is detached, update its position from the server to clients. This WILL cause it to get positioned slightly differently client side, as the server attachment system only copies parent origin and knows not about mesh / bone transformation. This prevents different clients seeing the object detached in different spots which is most correct Update the position of attached players to clients. An attached player will see himself move, but this is currently VERY ugly and laggy as it is done by the server (it probably must stay this way too) Use a different approach for locally attached players. This allows for smooth positio transitions to work, as well at the player turning around freely. Still buggy however