aboutsummaryrefslogtreecommitdiff
path: root/src/player.h
Commit message (Expand)AuthorAge
...
* Use integers instead of float valuesBlockMen2014-04-12
* Add third person viewBlockMen2014-04-12
* Add sneak and sneak_glitch to set_physics_override()PilzAdam2013-12-03
* Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenuKahrl2013-08-14
* Add set_breath and get_breath to lua API.RealBadAngel2013-07-20
* Dont write player files all the timePilzAdam2013-06-28
* Print playername when failing to read playerfile and ignore files starting wi...PilzAdam2013-06-22
* Add drowningPilzAdam2013-06-19
* Add ObjectRef.hud_set_hotbar_itemcount and add TOCLIENT_HUD_SET_PARAMKahrl2013-05-26
* Fix nearly all warningskwolekr2013-05-19
* Move player collisionbox to player classsapier2013-04-25
* Added support to disable built-in HUD elementsDiego Martínez2013-04-24
* Split HUD code off to hud.cpp, make into a class, extensive Lua HUD modificationkwolekr2013-04-18
* Lua HUDJonathon Anderson2013-04-18
* Allow modifying movement speed, jump height and gravity per-player via the Lu...MirceaKitsune2013-04-05
* Update Copyright YearsSfan52013-02-24
* Change Minetest-c55 to MinetestPilzAdam2013-02-24
* Improved Player PhysicsMirceaKitsune2013-02-14
* Tilt camera on player damage (tweaked by PilzAdam)Jeija2013-01-03
* Don't send player position from client to server if the player hasn't movedMirceaKitsune2012-12-02
* RealBadAngel's patch which allows the lua api to read pressed player keys. Th...MirceaKitsune2012-11-25
* Remove special handling of creative modePerttu Ahola2012-07-25
* Allow defining player's inventory form in LuaPerttu Ahola2012-07-19
* Optimize headersPerttu Ahola2012-06-17
* Initially split utility.h to multiple files in util/Perttu Ahola2012-06-17
* Switch the license to be LGPLv2/later, with small parts still remaining as GP...Perttu Ahola2012-06-05
* Add 'fly' and 'fast' privileges and the underlying privileges-to-client systemPerttu Ahola2012-03-31
* Simple fix for camera blinking black when jumping into ceiling with current s...Perttu Ahola2012-03-29
* added PlayerSAO and RemotePlayer, removed ServerRemotePlayerKahrl2012-03-29
* LocalPlayer::getStandingNodePos()Perttu Ahola2012-03-24
* Fix some warnings on some compilersGiuseppe Bilotta2012-02-02
* Inventory menu (with dragging) improved. Crafting is now handled via a IACTIO...Kahrl2012-01-22
* The huge item definition and item namespace unification patch (itemdef), see ...Kahrl2012-01-12
* Add get_look_dir(), get_look_pitch() and get_look_yaw() for playersPerttu Ahola2011-12-28
* Move ServerRemotePlayer to a separate filePerttu Ahola2011-12-02
* Make players be again visible from a long distancePerttu Ahola2011-12-02
* Players are more like objects + related stuffPerttu Ahola2011-12-01
* Player-is-SAO WIPPerttu Ahola2011-12-01
* Proper player inventory and hp modification tracking and sending accordinglyPerttu Ahola2011-11-29
* CraftItem rework and Lua interfaceKahrl2011-11-29
* Player movement speed and node access distance checkingPerttu Ahola2011-11-29
* on_newplayer and on_respawnplayer callbacksPerttu Ahola2011-11-29
* Clean mapnode.h and fix other files accordinglyPerttu Ahola2011-11-29
* GameDef compilesPerttu Ahola2011-11-29
* Create framework for getting rid of global definitions of node/tool/item/what...Perttu Ahola2011-11-29
* Scripting WIP: dynamic object stuffPerttu Ahola2011-11-29
* ServerRemotePlayer implements ServerActiveObjectPerttu Ahola2011-11-29
* Better player damage prevention when falling on unloaded blocks, not involvin...Perttu Ahola2011-10-16
* Simplistic wielded tool lighting, added setMeshVerticesColor to utility.h and...Kahrl2011-09-21
* fix a numerical problem, but tool is still jitteryKahrl2011-09-20
an class="hl kwd">get_player_name() if name == "" then return end hud_ids[name] = nil end local function player_event_handler(player,eventname) assert(player:is_player()) local name = player:get_player_name() if name == "" then return end if eventname == "health_changed" then initialize_builtin_statbars(player) if hud_ids[name].id_healthbar ~= nil then player:hud_change(hud_ids[name].id_healthbar,"number",player:get_hp()) return true end end if eventname == "breath_changed" then initialize_builtin_statbars(player) if hud_ids[name].id_breathbar ~= nil then player:hud_change(hud_ids[name].id_breathbar,"number",player:get_breath()*2) return true end end if eventname == "hud_changed" then initialize_builtin_statbars(player) return true end return false end function core.hud_replace_builtin(name, definition) if definition == nil or type(definition) ~= "table" or definition.hud_elem_type ~= "statbar" then return false end if name == "health" then health_bar_definition = definition for name,ids in pairs(hud_ids) do local player = core.get_player_by_name(name) if player and hud_ids[name].id_healthbar then player:hud_remove(hud_ids[name].id_healthbar) initialize_builtin_statbars(player) end end return true end if name == "breath" then breath_bar_definition = definition for name,ids in pairs(hud_ids) do local player = core.get_player_by_name(name) if player and hud_ids[name].id_breathbar then player:hud_remove(hud_ids[name].id_breathbar) initialize_builtin_statbars(player) end end return true end return false end core.register_on_joinplayer(initialize_builtin_statbars) core.register_on_leaveplayer(cleanup_builtin_statbars) core.register_playerevent(player_event_handler)