aboutsummaryrefslogtreecommitdiff
path: root/src/content_sao.cpp
Commit message (Collapse)AuthorAge
* FOV: Raise lower limit to avoid zoom-loading of distant world (#7234)Paramat2018-04-15
| | | | | | | | | | In the client, raise lower limit from 30 to 45 degrees, to avoid server seeing this as a zoom and loading world beyond the server-set limit. Add minimum in settingtypes.txt and enforce lower limit when set using minetest.conf. In the server, distrust the client-sent FOV if below the heuristic zoom threshold and use the player object property 'zoom_fov' to check it, to protect against hacked clients.
* Fix SAOM (#7200)Vitaliy2018-04-06
| | | | * Bugfix
* Fix various clang-tidy reported performance-type-promotion-in-math-fnLoïc Blot2018-04-03
|
* Optimize entity-entity collision (#6587)Vitaliy2018-04-03
| | | | | | * Add IrrLicht type aliases * Add hash for IrrLicht vector * Add object map
* Optional alpha channel support for entitiesstujones112018-03-29
|
* Fix a warning introduced by c5b4e541749c50805519ce040d98a0a8e5e0ec03Loic Blot2018-03-29
|
* Add reasons to on_dieplayer and on_hpchangeAndrew Ward2018-03-28
|
* SAO limits: Allow SAOs to exist outside the set 'mapgen limit'paramat2018-02-26
|
* Refine movement anticheat again (#7004)sfan52018-02-02
| | | | * Account for walking speed in vertical dir * Avoid undefined behaviour due to division-by-zero
* Apply physics overrides correctly during anticheat calculations (#6970)sfan52018-01-28
|
* Zoom: Set zoom FOV per-player using a player object propertyparamat2017-12-04
| | | | | | | | | | | | | Remove player object property 'can zoom'. Add player object property 'zoom fov'. Remove clientside setting for 'zoom fov'. Object property default is 15 degrees in creative mode, zoom disabled in survival mode. Needed due to zoom now loading and/or generating distant world according to zoom FOV. Update object properties serialisation version to 3.
* CAO/SAO: Nicer velocity-controlled, interpolated rotation property:SmallJoker2017-12-01
| | | | | 'automatic_face_movement_max_rotation_per_sec'. Rotate towards the smaller angle.
* PlayerSAO damage: Update to cope with variable player heightsparamat2017-11-14
| | | | Nearby codestyle cleanup.
* Player eye height: Make this a settable player object propertyparamat2017-11-06
|
* Make Player::peer_id server-side only and add getters and setters (#6478)Loïc Blot2017-09-30
| | | | | | | * Make Player::peer_id server-side only and add getters and setters Player::peer_id has no sense client side, move it to server, make it private and add setter and getter Also add some PEER_ID_INEXISTENT instead of harcoded 0
* Add session_t typedef + remove unused functions (#6470)Loïc Blot2017-09-27
| | | | | | * Add session_t typedef + remove unused functions u16 peer_id is used everywhere, to be more consistent and permit some evolutions on this type in the future (i'm working on a PoC), uniformize u16 peer_id to SessionId peer_id
* ServerEnv: Clean up object lifecycle handling (#6414)sfan52017-09-15
| | | | * ServerEnv: Clean up object lifecycle handling
* Customizeable max breath for players (#6411)SmallJoker2017-09-15
| | | | * Customizeable maximal breath for players
* Fix animation frame_speed and blend loosing precision due to incorrec… (#6357)sapier2017-09-01
| | | | | * Fix animation frame_speed and blend loosing precision due to incorrect data type Add lua function set_animation_frame_speed to update the frame speed without resetting the animation to start
* Zoom: Move enabling zoom to a new player object propertyparamat2017-08-30
| | | | | Default enabled for no change in default behaviour. Remove 'zoom' privilege.
* Make entity selection and collision boxes independently settable (#6218)stujones112017-08-24
| | | | * Make entity selection and collision boxes independently settable
* Respect object property hp_max field for players (#6287)SmallJoker2017-08-23
| | | | | | | | | | | * Respect object property hp_max field for players This allows modders to configure the maximal HP per player * Statbars: Downscale bar to full 20 HP when exceeding this value Add default max HP for players and breath constants to builtin Document the constants * Rename PLAYER_MAX_HP -> PLAYER_MAX_HP_DEFAULT
* Do not add base position to player selection box (#6241)stujones112017-08-23
|
* Modernize code: very last fixes (#6290)Loïc Blot2017-08-20
| | | Last modernization fixes
* Modernize src/c* src/d* and src/e* files (#6263)Loïc Blot2017-08-17
| | | | | | | | | | | | | | | | | * Modernize src/c* src/d* and src/e* files * default operator * redundant init * delete default constructors on CraftDefinition childs (never used) * fix some missing init values * const ref fix reported by clang-tidy * ranged-based for loops * simple conditions & returns * empty stl function instead of size * emplace_back stl function instead of push_back + construct temp obj * auto for some iterators * code style fixes * c++ stl headers instead of C stl headers (stdio.h -> cstdio)
* Step height: Add as a player object propertyparamat2017-08-09
| | | | | Add settable player step height using the existing object property. Breaks compatibility with old clients, add to protocol version 35.
* Add LuaEntity on_death callback (#6177)Loïc Blot2017-07-27
| | | | | | Add LuaEntity on_death callback This fixes #5474
* Player collisionbox: Make settableTeTpaAka2017-07-21
| | | | Breaks compatibility with old clients.
* Expose getPointedThing to LuaDániel Juhász2017-07-07
| | | | | | This commit introduces Raycast, a Lua user object, which can be used to perform a raycast on the map. The ray is continuable, so one can also get hidden nodes (for example to see trough glass).
* C++11 patchset 9: move hardcoded init parameters to class definitions (part ↵Loïc Blot2017-06-16
| | | | | | | | | | | | | | | | | | | | | | | | 1) (#5984) * C++11 patchset 9: move hardcoded init parameters to class definitions C++11 introduced the possibility to define the default values directly in class definitions, do it on current code Also remove some unused attributes * CollisionInfo::bouncy * collisionMoveResult::collides_xy * collisionMoveResult::standing_on_unloaded * Clouds::speed * More constructor cleanups + some variables removal * remove only write guiFormSpecMenu::m_old_tooltip * move header included inside defintions in genericobject.h * remove some unused since years exception classes * remove unused & empty debug_stacks_init * remove unused & empty content_nodemeta_serialize_legacy * remove forgotten useless bool (bouncy) in collision.cpp code
* C++11 patchset 2: remove util/cpp11.h and util/cpp11_container.h (#5821)Loïc Blot2017-06-04
|
* Properly remove SAO when worldedges are overtaken (#5889)Loïc Blot2017-06-03
| | | | | | | | | | | | * LuaEntitySAO: Remove beyond outermost mapchunk edges Based on a commit by, and with help from, nerzhul. Add 2 functions to class Mapgen: A function to calculate actual mapgen edges, called from the Mapgen constructor. A function called indirectly from content_sao.cpp per entity step to check SAO position is within mapgen edges. * Calculate borders from params not mapgen, which is not available everytime
* Revert custom player collision box and step height commitsparamat2017-05-09
| | | | | These caused inability to pass through 2 node high spaces or step up onto slabs or steps when a new client connected to an older server.
* Player properties: Set correct default collisionboxparamat2017-05-07
| | | | | | | | | Recent commit b6f4a9c7e1a4f0bac66fd6f6ff844425ac775975 removed a hardcoded player collisionbox which resulted on falling back to an incorrect default. This stopped players walking through 2-node high spaces and made the player slightly wider. Improve docs for custom player collisionbox feature and reformat nearby lines.
* Make the player collisionbox settableTeTpaAka2017-05-06
|
* Use stepheight from CAO instead of hardcoded valueSapier2017-05-06
|
* Rename Scripting API files for consistencyShadowNinja2017-04-25
|
* Player data to Database (#5475)Loïc Blot2017-04-23
| | | | | | | | | | | | * Player data to Database Add player data into databases (SQLite3 & PG only) PostgreSQL & SQLite: better POO Design for databases Add --migrate-players argument to server + deprecation warning * Remove players directory if empty
* Sneak glitch: Set default to falseparamat2017-04-22
| | | | | | | | The 'sneak glitch' physics override now controls whether a player can use the new move code replications of the old sneak side-effects: sneak ladders and 2 node sneak jump. This completes our intention to replicate the old sneak side-effects in new code and provide them as an option that is disabled by default.
* Sneak: Add option for old move codeparamat2017-04-17
| | | | | | Temporary option for the old move code for specific old sneak behaviour. Enabled by setting the added 'new move' physics override to false. By default 'new move' is true.
* Partial damage cheat fix: node damages server side (#4981)Loïc Blot2017-04-15
| | | | | | * Damage cheat fix: server side * Lava/Node damages overtime server side * lava hurt interval is only for old protocol
* Fix problems when overriding the hand:Ekdohibs2017-04-06
| | | | | - If the hand can dig a node the item wielded can't, allow to dig it anyway. - Fix the API callbacks from setting the hand instead of the wielded item.
* Fix multiple death messages (#5305)presstabstart2017-04-06
| | | | Fix multiple death messages (#3565) and damage server logs after death.
* Update server min protocol version to v24 (#5411)Loïc Blot2017-03-19
| | | | | | | | | | * Update server min protocol version to v24 It's based on @sfan5 stats. See https://kitsunemimi.pw/tmp/serverlist_stats_2017-03-17.txt v24 was bumped 25/08/14 and 0.4.11 was released 25/12/14 * Drop protocol v23 and lesser code
* [CSM] Client side moddingLoic Blot2017-03-13
| | | | | | | | | | * rename GameScripting to ServerScripting * Make getBuiltinLuaPath static serverside * Add on_shutdown callback * Add on_receiving_chat_message & on_sending_chat_message callbacks * ScriptApiBase: use IGameDef instead of Server This permits to share common attribute between client & server * Enable mod security in client side modding without conditions
* Do not increase breath if at full breath.Auke Kok2017-03-11
| | | | | Prevents the server from sending TOCLIENT_BREATH packets every 0.5seconds, if there is no reason to.
* Fix anticheat resetting client position after the client is teleportedEkdohibs2017-02-01
| | | | | | | | | | | | | | | Previously, m_move_pool could accomodate the client moving from the new position to the old one, and the server accepted the client to go back to its old position. However, it couldn't then accomodate the client moving from its old to its new position, and therefore would reset position to the old position. Thus, by emptying m_move_pool after a teleport, the server no longer accepts the client to go back to its old position. A drawback is however that a laggy client *will* trigger a few "moved_too_fast" anticheats before being told about its new position. Don't report player cheated if caused by lag. Fixes #5118
* Make entity on_punch have same signature and behaviour as player on_punchsapier2017-01-28
|
* Implement player attribute backend (#4155)Loïc Blot2017-01-27
| | | | | | | | | | | | | | | * This backend permit mods to store extra players attributes to a common interface. * Add the obj:set_attribute(attr, value) Lua call * Add the obj:get_attribute(attr) Lua call Examples: * player:set_attribute("home:home", "10,25,-78") * player:get_attribute("default:mana") Attributes are saved as a json in the player file in extended_attributes key They are saved only if a modification on the attributes occurs and loaded when emergePlayer is called (they are attached to PlayerSAO).
* Revert "Detach the player from entities on death." (#5087)Loïc Blot2017-01-21
|