aboutsummaryrefslogtreecommitdiff
path: root/src/player.cpp
AgeCommit message (Collapse)Author
2023-03-07Dual wieldingLizzy Fleckenstein
2023-02-20Add chat HUD flag (#13189)Alex
2022-03-05Readd basic_debug as a HUD flag (#12020)Lars Müller
2022-01-09Restore pass-through of direction keys (#11924)sfan5
This moves relevant code into the PlayerControl class and gets rid of separate keyPressed variable.
2019-08-07Unify wield item handling (#8677)SmallJoker
This moves the wield item functions to Player and the tool utils for range calculation Also 'local_inventory' was removed due to redundancy in Client
2018-12-31Extend pitch fly mode to swimming (#7943)random-geek
2018-12-01Added pitch fly mode (#7817)Gaël C
In pitch fly mode, you fly to the exact direction you are pointing at, using the forward key. Other move directions are also pitched accordingly. It allows smoother and more complex movements. Can be enabled/disabled by L key by default (set keymap_pitchfly in minetest.conf)
2018-11-22Client-side autojump. Remove Android-only stepheight autojump (#7228)Ben Deutsch
Works by detecting a collision while moving forward and then simulating a jump. If the simulated jump is more successful, an artificial jump key press is injected in the client. Includes setting and key change GUI element for enabling and disabling this feature.
2018-10-04Player hand list: require init by modsSmallJoker
Mods will now have to initialize the list/slot in order to define the default player hand. They may use the inventory callbacks to prevent abuse of this list.
2018-06-24Fix rtt >= 0.0f assertion and free_move crashSmallJoker
2018-04-18PlayerSettings struct for player movement code (#7243)Ben Deutsch
Instead of calling g_settings->getBool("flag") multiple times during each movement step, the current settings are cached in a new player object member. Updated via registered callbacks.
2017-08-20Minimap: Add new HUD flag for minimap radar modeparamat
Flag default is true to not change default behaviour. The existing minimap HUD flag remains the master control for minimap.
2017-06-18Cpp11 patchset 11: continue working on constructor style migration (#6004)Loïc Blot
2016-11-26Wieldhand: Allow overriding the handTeTpaAka
2016-10-30PlayerSAO/LocalPlayer refactor: (#4612)Ner'zhul
* Create UnitSAO, a common part between PlayerSAO & LuaEntitySAO * Move breath to PlayerSAO & LocalPlayer * Migrate m_yaw from (Remote)Player & LuaEntitySAO to UnitSAO * Migrate m_yaw from Player to LocalPlayer for client * Move some functions outside of player class to PlayerSAO/RemotePlayer or LocalPlayer depending on which class needs it * Move pitch to LocalPlayer & PlayerSAO * Move m_position from Player to LocalPlayer * Move camera_barely_in_ceiling to LocalPlayer as it's used only there * use PlayerSAO::m_base_position for Server side positions * remove a unused variable * ServerActiveObject::setPos now uses const ref * use ServerEnv::loadPlayer unconditionnaly as it creates RemotePlayer only if it's not already loaded * Move hp from Player to LocalPlayer * Move m_hp from LuaEntitySAO to UnitSAO * Use m_hp from PlayerSAO/UnitSAO instead of RemotePlayer
2016-10-08Move RemotePlayer code to its own cpp/headerLoic Blot
2016-10-08RemotePlayer/LocalPlayer Player base class proper separation (code cleanup) ↵Loic Blot
(patch 3 of X) * remove IGameDef from Player class, only LocalPlayer has it now * move many attributes/functions only used by LocalPlayer from Player to LocalPlayer * move many attributes/functions only used by RemotePlayer from Player to RemotePlayer * make some functions const * hudGetHotbarSelectedImage now returns const ref * RemotePlayer getHotbarSelectedImage now returns const ref * various code style fixes
2016-10-05Chat: new settings to prevent spamLoic Blot
Added the following chat coreside features * Chat messages length limit * Message rate limiting * Message rate kicking Note: * handleChat now takes RemotePlayer pointer instead of u16 to remove useless lookups
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-02-14Player::accelerateHorizontal/Vertical should be member of LocalPlayerLoic Blot
2015-12-15Get movement setting instead of hard coded valueasl97
2015-08-23Clean up threadingShadowNinja
* Rename everything. * Strip J prefix. * Change UpperCamelCase functions to lowerCamelCase. * Remove global (!) semaphore count mutex on OSX. * Remove semaphore count getter (unused, unsafe, depended on internal API functions on Windows, and used a hack on OSX). * Add `Atomic<type>`. * Make `Thread` handle thread names. * Add support for C++11 multi-threading. * Combine pthread and win32 sources. * Remove `ThreadStarted` (unused, unneeded). * Move some includes from the headers to the sources. * Move all of `Event` into its header (allows inlining with no new includes). * Make `Event` use `Semaphore` (except on Windows). * Move some porting functions into `Thread`. * Integrate logging with `Thread`. * Add threading test.
2015-08-13minimap: Add ability to disable from serverkwolekr
2015-07-23Optional reconnect functionalityest31
Enable the server to request the client to reconnect. This can be done with the now extended minetest.request_shutdown([reason], [reconnect]) setting.
2015-07-21Remove profiler.h include where it's not needed. Remove some unreachable and ↵Loic Blot
very old code
2015-06-16Add list-ringsest31
Adds list-rings, a method to implement item sending between inventories via shift-click. Nice insider feature: a ring consisting of a single inventory list serves as nice clean-up method. Also adds them to minimal game, and the standard inventory. Craft output slots are not supported.
2015-03-28Fix uninitialized variable Player::local_animation_speedLoic Blot
2015-03-22Player: Fix a deadlock triggered by previous commit ↵Loic Blot
0e5e49736c0a5fa29bca257bafc02d7c7a7171c9
2015-03-22Protect Player::hud from concurrent modificationsLoic Blot
Sometimes HUD can be modified by ServerThread and EmergeThread results in a crash on client side because the HUD is not correct
2015-02-05Give full breath after deathSmallJoker
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-01Make players check inventory modification properlyShadowNinja
2014-10-01Simplify player modification checksShadowNinja
2014-09-21Split settings into seperate source and header filesShadowNinja
This also cleans up settings a bit
2014-07-02Fix memory leaks in GenericCAO, ShaderSource and Player classessapier
2014-06-29Make player files saving againSmallJoker
2014-06-23Store the maximum player file tries in a constantShadowNinja
2014-06-23Only try to load from possible player filesShadowNinja
2014-06-23Only keep players loaded while they're connectedShadowNinja
2014-05-31Small cleanup of hud add/remove codesapier
2014-01-16Prevent player jumping into nodes from belowBlockMen
Fixes camera glitch and cheating at drowning
2013-12-03Add sneak and sneak_glitch to set_physics_override()PilzAdam
2013-08-14Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenuKahrl
2013-08-07Fix various memory access problems detected by valgrindKahrl
2013-07-20Add set_breath and get_breath to lua API.RealBadAngel
2013-06-28Dont write player files all the timePilzAdam
2013-06-22Print playername when failing to read playerfile and ignore files starting ↵PilzAdam
with .
2013-06-19Add drowningPilzAdam
2013-05-26Add ObjectRef.hud_set_hotbar_itemcount and add TOCLIENT_HUD_SET_PARAMKahrl
2013-04-25Generalize hud_builtin_enable into hud_set_flagskwolekr