aboutsummaryrefslogtreecommitdiff
path: root/src/content_cao.cpp
AgeCommit message (Collapse)Author
2018-11-28Move client-specific files to 'src/client' (#7902)Quentin Bazin
Update Android.mk Remove 'src/client' from include_directories
2018-11-28Add Lua methods 'set_rotation()' and 'get_rotation()' (#7395)CoderForTheBetter
* Adds Lua methods 'set_rotation()' and 'get_rotation'. Also changed some method names to be more clear. Instead of an f32 being sent over network for yaw, now a v3f is sent for rotation on xyz axes. Perserved Lua method set_yaw/setyaw so that old mods still work, other wise to set yaw they would need to switch to set_rotation(0, yaw, 0).
2018-08-02Smoothed yaw rotation for objects (#6825)SmallJoker
2018-05-14Make sure color returns to normal after a damage flash (#7332)lhofhansl
2018-04-30Allow damage for attached objects, add attach/detach callbacks (#6786)SmallJoker
* Allow right-clicking on attached LuaEntities
2018-04-09upright_sprite: Fix texture position for playersSmallJoker
Fixes #6471
2018-04-04[clang-tidy] Promote some performance-* as a coding error (#7194)Loïc Blot
* Promote performance-type-promotion-in-math-fn as a coding error * Promote performance-faster-string-find too (which is not problematic currently) * Same for performance-implicit-cast-in-loop * Fix remaining tidy points
2018-04-04Fix last performance-type-promotion-in-math-fn problemsLoic Blot
2018-03-29Optional alpha channel support for entitiesstujones11
2018-03-24Cleanup sound manager class (#7158)Loïc Blot
* Cleanup sound manager client * Use some const refs * Use auto on iterators * Drop unused parameters * Move sound_openal.* to client folder * Move sound.cpp + OnDemandSoundFetcher to client/ folder + reorganize includes properly
2018-02-10Node definition manager refactor (#7016)Dániel Juhász
* Rename IWritableNodeDefManager to NodeDefManager * Make INodeDefManager functions const * Use "const *NodeDefManager" instead of "*INodeDefManager" * Remove unused INodeDefManager class * Merge NodeDefManager and CNodeDefManager * Document NodeDefManager
2018-02-10Position entity nametags relative to selection-box (#7031)stujones11
2018-01-23Disable fall damage when "immortal" group set (#6946)lisacvuk
2017-12-25- Clear colors when reading property info.Rob Blanckaert
- Set vertex colors on upright_sprites.
2017-12-04Use Irrlicht's mesh cache for animated meshes.Lars Hofhansl
Fixes #6676. Allow animated meshes to be cached in Irrlicht's builtin mesh cache. Use Material.EmmissiveColor instead of manipulating the mesh' vertex colors.
2017-12-04Zoom: Set zoom FOV per-player using a player object propertyparamat
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.
2017-12-01CAO/SAO: Nicer velocity-controlled, interpolated rotation property:SmallJoker
'automatic_face_movement_max_rotation_per_sec'. Rotate towards the smaller angle.
2017-11-06Player eye height: Make this a settable player object propertyparamat
2017-10-28Avoid filtering low-res textures for animated meshes (incl. players) (#6562)lhofhansl
2017-10-02CAO footstep sounds: Reduce gain to balance volumeparamat
2017-09-14Object properties: Add 'glow', disables light's effect if negativeRob Blanckaert
The 'glow' value is added to the ambient light value. Negative 'glow' disables light's effect on object colour, for faking self-lighting, UI-style entities, or programmatic colouring in mods.
2017-09-01Fix animation frame_speed and blend loosing precision due to incorrec… (#6357)sapier
* 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
2017-08-30Zoom: Move enabling zoom to a new player object propertyparamat
Default enabled for no change in default behaviour. Remove 'zoom' privilege.
2017-08-29Bump minimal protocol version to 36 (#6319)SmallJoker
* Bump minimal protocol version to 36 Item/Node/TileDef, NodeBox, TileAnimation: Remove old compat code * Accept future serialisation versions
2017-08-24Make entity selection and collision boxes independently settable (#6218)stujones11
* Make entity selection and collision boxes independently settable
2017-08-19GenericCAO: Fix light position for non-players, remove deprecated ↵SmallJoker
initialisation code (#6281)
2017-08-19ItemCAO removal (#6279)Loïc Blot
This object is from 0.3 era and was never used since 0.4.X and GenericCAO usage
2017-08-17Modernize src/c* src/d* and src/e* files (#6263)Loïc Blot
* 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)
2017-08-16Cleanup various headers to reduce compilation times (#6255)Loïc Blot
* Cleanup various headers to reduce compilation times
2017-07-30GenericCAO: Fix dark model below y = 0paramat
Move point at which light is sampled up to 0.5 nodes above foot level, to avoid that point sometimes passing into the node below causing the model to go dark.
2017-07-29Move the nametag back to the top of the player (#6179)TeTpaAka
read the actual height of the collisionbox
2017-07-21Player collisionbox: Make settableTeTpaAka
Breaks compatibility with old clients.
2017-07-07Expose getPointedThing to LuaDániel Juhász
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).
2017-07-02Irrlicht cleanup: cleanup various object to use RenderingEngine (#6088)Loïc Blot
* Irrlicht cleanup: cleanup various object to use RenderingEngine * CAO doesn't need scenemanager in addToScene * Camera doesn't need VideoDriver pointer or SceneManager in constructor * Hud doesn't need driver & scene manager in constructor * Hud doesn't need scenemanager pointer * Tile.h doesn't need IrrlichtDevice header (just SMaterial) * WieldMeshSceneNode: only take scene, we always use scene root node as parent
2017-06-19Remove IrrlichtDevice unused pointer from ClientActiveObject class & childs ↵Loïc Blot
(#6010)
2017-06-17Cpp11 initializers 2 (#5999)Loïc Blot
* C++11 patchset 10: continue cleanup on constructors * Drop obsolete bool MainMenuData::enable_public (setting is called with cURL in server loop) * More classes cleanup * More classes cleanup + change NULL tests to boolean tests
2017-06-16C++11 patchset 9: move hardcoded init parameters to class definitions (part ↵Loïc Blot
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
2017-06-08Have the server send the player list to the client (#5924)red-001
* Have the server send the player list to the client Currently the client generates the player list based on the Client active object list, the issue with this is that we can't be sure all player active objects will be sent to the client, so this could result in players showing up when someone run `/status` but auto complete not working with their nick and CSM not being aware of the player
2017-06-04C++11 patchset 2: remove util/cpp11.h and util/cpp11_container.h (#5821)Loïc Blot
2017-05-29Don't add damage flash while punch texture modifier is active (#5767)stujones11
2017-05-20Various code cleanup & little performance improvement on HTTP download (#5772)Loïc Blot
* Disable or remove unused enum members/functions * Tiny code style fixes * Make some functions const * Replace ClientMediaDownloader std::unordered_map with std::map
2017-05-09Revert custom player collision box and step height commitsparamat
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.
2017-05-06Clean up numeric.h and split FacePositionCache from itShadowNinja
I also optiized FacePositionCache a bit: I removed a map lookup and vector copy from both branches of getFacePosition.
2017-05-06Make the player collisionbox settableTeTpaAka
2017-05-06Make players respect makes_footstep_sound in the object propertiesTeTpaAka
2017-04-29content_cao: fix getPlayerControl structure copy on each step (#5677)Loïc Blot
Also fix some codestyle issues around it.
2017-04-22Revert a const ref on update textureLoic Blot
if mod is a reference to a class member a variable swap breaks. We should find a way to keep this const ref if possible. Added a comment about this in header
2017-04-19Fix various variables passed by copy instead of const ref (#5610)Loïc Blot
Pointed by cppcheck
2017-04-17Sneak: Add option for old move codeparamat
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.
2017-04-08Hardware coloring for itemstacksDániel Juhász
Adds the possibility to colorize item stacks based on their metadata. In the item/node definition you can specify palette (an image file) and color (fallback color if the item has no palette or metadata). Then you can add palette_index to the metadata. Dropped itemstacks with different colors do not merge.