aboutsummaryrefslogtreecommitdiff
path: root/src/client/content_cao.cpp
AgeCommit message (Collapse)Author
2020-11-12Fix player sprite visibility in first personsfan5
closes #10525
2020-11-12Fix overloaded virtual warnings with get/setAttachment()sfan5
2020-11-08ContentCAO: Fix segfault when minimap is disabledSmallJoker
2020-11-04Revert "Fix short 180 degree rotation when using set_bone_position (#10405)" ↵Lars Müller
(#10534) This reverts commit 0f98b54aa4b2361575002d92b29fe222703ba557.
2020-10-20Fix show_on_minimap default value for local playersfan5
fixes #10526
2020-10-19Decouple entity minimap markers from nametags replacing with show_on_minimap ↵sfan5
property (#10443)
2020-10-04Add First Person Attachments (#10360)Jordan Snelling
Fixes some other third person camera specific attachments. Implements a single new flag for entities to be forced visible in first person mode. Old mods do not need to be updated to use the new flag and are fully backwards compatible.
2020-10-04Fix short 180 degree rotation when using set_bone_position (#10405)Lars Müller
2020-10-01(se)SerializeString: Include max length in the nameSmallJoker
This commit clarifies the maximal length of the serialized strings. It will avoid accidental use of serializeString() when a larger string can be expected. Removes unused Wide String serialization functions
2020-08-15Allow binding dig, place actions to keys; remove LMB/RMB hardcodingANAND
Co-authored-by: Sam Caulfield <sam@samcaulfield.com>
2020-07-30content_cao: Support texture animation for upright_sprite (#10020)sfan5
2020-06-26Fix bone-attached entities (#10015)hecktest
2020-06-18content_cao: Fix behavior of legacy "textures" field for wielditemssfan5
2020-06-16Make shading of CAOs optional (#10033)Danila Shutov
2020-06-11Use multiple light positions for CAO lightingsfan5
2020-06-11content_cao: Do not expire visuals for texture updatessfan5
2020-06-09Fix player-to-object attachment teleport bug (#10008)hecktest
Fixes two bugs: * The camera offset was not applied to an object while detaching, briefly placing the irrlicht matrixnode in world space. * When attaching, the matrixnode's absolute position was evaluated without evaluating the parent first, resulting in zeroed positions.
2020-06-07Recalculate mesh normals for CAOs (#10000)Danila Shutov
2020-06-07GenericCAO: Fix glow not working since a08d18aSmallJoker
2020-06-04Move shared parameters sending to UnitSAO (#9968)SmallJoker
Better header sorting by topic Make UnitSAO-specific parameters private Skip redundant recursive entity sending code (since ~5.2.0)
2020-06-01ContentCAO: Update light of all attached entities (#9975)SmallJoker
2020-05-29Clean up CAO nametag handling and remove deprecated AO_CMDsfan5
AO_CMD_UPDATE_NAMETAG_ATTRIBUTES was deprecated in 9eee3c3f465c071bb9908749cf48be3c131a1bdf (0.4.14)
2020-05-29content_cao: Do not expire visuals when not necessarysfan5
fixes #6572
2020-05-24Fix two bugs in content_caosfan5
fixes #9889 (backface_culling with visual = "cube") fixes #9916 (crash with visual = "upright_sprite")
2020-05-16Make automatic_rotate relative, allow setting rotation (#8468)ANAND
automatic_rotate does not make sense if it is absolute. Make it relative. To avoid bouncing, set_rotation did not update the client when automatic_rotate was set. That's no longer necessary because the new spinning method applies the rotation on top of the current one, and the updates are necessary for set_rotation to actually transform the object. Co-authored-by: ANAND <ClobberXD@gmail.com> Co-authored-by: Pedro Gimeno <pgimeno@users.noreply.notabug.org>
2020-05-11Damage texture modifier (#9833)Lars Müller
Adds a new object property "damage_texture_modifier"
2020-04-26Fix UpdateBonePosition() breaking animations (#9577)theviper121
2020-04-19Reuse object_shader for "wielditem" and "item" entity drawtypes (#9537)Danila Shutov
2020-04-11Use TILE_MATERIAL_ALPHA for use_texture_alpha entity flag (#9639)Alex
Fixes #9637.
2020-04-10Drop genericobject.{cpp,h} (#9629)Loïc Blot
* Drop genericobject.{cpp,h} This file is not for generic object but for ActiveObject message passing. Put ownership of the various commands to the right objects and cleanup the related code. * Protect ServerActiveObject::m_messages_out * typo fix
2020-04-08Overall improvements to log messages (#9598)sfan5
Hide some unnecessarily verbose ones behind --trace or disable them entirely. Remove duplicate ones. Improve their contents in some places.
2020-03-28Fix crash on wielditem/item entitiessfan5
bug was introduced in f3032a637c53f3c98fbbed1d3b691898aabe1687
2020-03-23Fix incorrect light updates for wielditem and item visuals (#9540)Danila Shutov
An alternative to #9537
2020-03-16Fix entity lighting (#9514)Danila Shutov
fixes #9482
2020-02-16Basic model shading (#9374)Danila Shutov
2019-12-07Renaming the function wasn't enoughSmallJoker
2019-12-07Attachments: Fix interpolation from (0,0,0) after detachSmallJoker
GenericCAO::getPosition() did not take the camera offset into account LocalPlayer attachment cleanup: Use sane getParent() function Make that getPosition() (GenericCAO and LocalPlayer) always return the absolute position
2019-12-05Fix LocalPlayer-bound sound playback broken by 81c2370SmallJoker
2019-10-06Fix upright_sprite lighting when colors are setsfan5
fixes #9020
2019-10-05Fix unwanted detaching when damage = 0Jacob Lifshay
2019-10-02Attachments: Fix attachments to temporary removed objects (#8989)SmallJoker
Does not clear the parent's attachment information when the child is deleted locally. Either it was removed permanently, or just temporary - we don't know, but it's up to the server to send a *detach from child" packet for the parent.
2019-08-31Fix rotation of attached particlespawnerPedro Gimeno
Co-authored-by: ANAND <ClobberXD@gmail.com>
2019-08-20Disable autoforward if player is deadANAND
2019-08-10Merge pull request #8776 from osjc/FixGetNodeJozef Behran
Finish getNode cleanup
2019-07-29ContentCAO: Fix broken attachments on join (#8701)SmallJoker
What happened: 1) Object data is received. Client begins to read the data 2) Client initializes all its children (gob_cmd_update_infant) 3) Children try to attach to parent (yet not added) 4) Parent initializes, is added to the environment And somewhere in between, Irrlicht wrecks up the attachments due to the missing matrix node. The solution here is to: 1) Use the same structure as ServerActiveObject 2) Attach all children after the parent is really initialized
2019-05-26Fix persistent ^[brighten after damage again (#5739)SmallJoker
The old texture modifier is restored by passing `m_previous_texture_modifier`. Either copy it manually or let the function parameter do that. Victims so far: 8e0b80a Apr 2018 eb2bda7 May 2019
2019-05-18Optimize string (mis)handling (#8128)Jozef Behran
* Optimize statbar drawing The texture name of the statbar is a string passed by value. That slows down the client and creates litter in the heap as the content of the string is allocated there. Convert the offending parameter to a const reference to avoid the performance hit. * Optimize texture cache There is an unnecessary temporary created when the texture path is being generated. This slows down the cache each time a new texture is encountered and it needs to be loaded into the cache. Additionally, the heap litter created by this unnecessary temporary is particularly troublesome here as the following code then piles another string (the resulting full path of the texture) on top of it, followed by the texture itself, which both are quite long term objects as they are subsequently inserted into the cache where they can remain for quite a while (especially if the texture turns out to be a common one like dirt, grass or stone). Use std::string.append to get rid of the temporary which solves both issues (speed and heap fragmentation). * Optimize animations in client Each time an animated node is updated, an unnecessary copy of the texture name is created, littering the heap with lots of fragments. This can be specifically troublesome when looking at oceans or large lava lakes as both of these nodes are usually animated (the lava animation is pretty visible). Convert the parameter of GenericCAO::updateTextures to a const reference to get rid of the unnecessary copy. There is a comment stating "std::string copy is mandatory as mod can be a class member and there is a swap on those class members ... do NOT pass by reference", reinforcing the belief that the unnecessary copy is in fact necessary. However one of the first things the code of the method does is to assign the parameter to its class member, creating another copy. By rearranging the code a little bit this "another copy" can then be used by the subsequent code, getting rid of the need to pass the parameter by value and thus saving that copying effort. * Optimize chat console history handling The GUIChatConsole::replaceAndAddToHistory was getting the line to work on by value which turns out to be unnecessary. Get rid of that unnecessary copy by converting the parameter to a const reference. * Optimize gui texture setting The code used to set the texture for GUI components was getting the name of the texture by value, creating unnecessary performance bottleneck for mods/games with heavily textured GUIs. Get rid of the bottleneck by passing the texture name as a const reference. * Optimize sound playing code in GUIEngine The GUIEngine's code receives the specification of the sound to be played by value, which turns out to be most likely a mistake as the underlying sound manager interface receives the same thing by reference. Convert the offending parameter to a const reference to get rid of the rather bulky copying effort and the associated performance hit. * Silence CLANG TIDY warnings for unit tests Change "std::string" to "const std::string &" to avoid an unnecessary local value copy, silencing the CLANG TIDY process. * Optimize formspec handling The "formspec prepend" parameter was passed to the formspec handling code by value, creating unnecessary copy of std::string and slowing down the game if mods add things like textured backgrounds for the player inventory and/or other forms. Get rid of that performance bottleneck by converting the parameter to a const reference. * Optimize hotbar image handling The code that sets the background images for the hotbar is getting the name of the image by value, creating an unnecessary std::string copying effort. Fix that by converting the relevant parameters to const references. * Optimize inventory deserialization The inventory manager deserialization code gets the serialized version of the inventory by value, slowing the server and the client down when there are inventory updates. This can get particularly troublesome with pipeworks which adds nodes that can mess around with inventories automatically or with mods that have mobs with inventories that actively use them. * Optimize texture scaling cache There is an io::path parameter passed by value in the procedure used to add images converted from textures, leading to slowdown when the image is not yet created and the conversion is thus needed. The performance hit is quite significant as io::path is similar to std::string so convert the parameter to a const reference to get rid of it. * Optimize translation file loader Use "std::string::append" when calculating the final index for the translation table to avoid unnecessary temporary strings. This speeds the translation file loader up significantly as std::string uses heap allocation which tends to be rather slow. Additionally, the heap is no longer being littered by these unnecessary string temporaries, increasing performance of code that gets executed after the translation file loader finishes. * Optimize server map saving When the directory structure for the world data is created during server map saving, an unnecessary value passing of the directory name slows things down. Remove that overhead by converting the offending parameter to a const reference.
2019-04-14Attend to review, re-arrange blank lines, update lua_api.txtparamat
2019-04-14Fix regression in automatic_face_movement_max_rotation_per_secPedro Gimeno
Values <= 0 should make the yaw change instant. This worked in 0.4.16 but was broken in 089f59458286. Per bug report by oil_boi_minetest on IRC.
2019-02-10Consistent HP and damage types (#8167)SmallJoker
Remove deprecated HUDs and chat message handling. Remove unused m_damage variable (compat break). HP: s32 for setter/calculations, u16 for getter.