pick 0fd4508 3D model support for players using Irrlicht. Also ready the basis for mesh support on nodes / items via LUA (to be done). Supports any mesh format compatible with Irrlicht, but animations are not set up yet. s 12331c5 Properly set texture on meshes. Also revert the player back to "upright_sprite" because LUA will be used to set meshes (via obj:set_properties) pick 8b1347f Properly read the mesh from LUA. Players can now be set to meshes using the following test script: s f85339b Fix segmentation fault and prevent server from crashing if the mesh is not found pick dba9c03 Fix material properties and allow lighting. Models should now be affected by light instead of being black pick 8e94f8c Add a subfolder called models in the folders loaded from /mods, and filter by extention (obj md2 and md3 are currently allowed). The model path must however be changed and not use a direct location, but MineTest's media database s c9490fd Get rid of the texture string and use the existing textures array. Segmented meshes have multiple materials, and this will allow us to texture each. Do not switch to this commit yet! s 8efeba1 Properly check and apply the texture array. Insividual mesh segments can now be textured independently. s 112894c If a texture string is left empty in LUA, don't modify that material. Useful so a script can change specific textures without affecting others s 7321b56 Fix a bug in the texture loop and add error handling for missing textures s d9bf020 Add mesh to get_properties too in LUA, which should make it easier or possible to read the mesh of an object s ae8ab36 My attempts with celeron55 to get the mesh working through the server stream, which is a very complicated issue and required for b3d models to work pick 46e456e Get the mesh working through the memory cache properly. Most credit goes to celeron55 for the help on this code s d2dc342 Get the texture from memory as well s ed7f0fc Add .x to the list of supported formats s 09ac8f8 Update LUA API documentation s 2578ebf Attempt to implement an animation framework in parallel to ObjectProperties (called AnimationProperties). It's not fully used yet and I'm not sure if this is the correct way! s 7ff8495 Revert previous commit, I think it was a bad idea. Instead add a function in CAO which runs each step, that will check if animation properties have changed and update them if so. Currently just adds the base function to do that, no correct yet pick e4b45af Allow the LUA API to set animations to meshes as well as the animation speed. Also update animations only when needed s 2630d02 Support for animation blending, though for some reason it doesn't work s e05ced8 Don't enable animation transitions by default for many reaosons s 43a43bc Object property to store individual bone positions. LUA can specify a bone name followed by a bone position. No functionality yet. Bone rotation to be added in the following commit s 09c126b Same system for bone rotation, plus a few other things I missed pick 129ccc6 Joint positioning and rotation code, and fix a problem related to their lua API s 12117dd Attempt to move the animation system to a more correct implementation, rather than using object properties. Incomplete and breaks functionality pick 5d94829 Get the new animation framework properly working s 636bddd Store start and end frames as v2f s f387886 Also move bone animations to their own function instead of object properties pick 85a9233 New object property which allows changing the color and alpha of mesh materials. Due to the currentl lighting systems it doesn't work yet, but the full implementation is there s d438c9a Framework for the attachment system, with no actual functionality yet s 35350fc Send bone and player object to the setAttachment function in content_sao.cpp, but we need a way to translate it there and send it to the client s 826bbd1 I will also want position and rotation offsets to be possible to apply to attachments s af97a24 Network object ID from server to client. This will be used to identify the parent client-side and know what to attach to pick 640af51 Complete the attachment framework. The child ID can now be checked against the parent ID in content_cao.cpp so the parent can be detected. Actual attachment code to come s 2434502 Partial implementation of attaching, currently broken and non-functional. Attachments will need to be split better between the server and client s de89a3e Divide attachment system between server attachments and client attachments, neither coded right now. As explained in the code comment: s 78330ee Attempt to create attachment code for server objects, not working however s 89d113c Make the attachment code more consistent. It seems to partly work now with LUA objects attached to players s 9b0cf0d Add many code comments to help other developers find the remaining propblems and understand the architecture of the attachment system. For all key points, grep the code for: // REMAINING ATTACHMENT ISSUES: s 993dc78 More general work on attachments, and remove warning comments where I'm sure I did things right s 3dadc8b Don't allow attachments to be punched... better for many reasons s 2c82e9c Allow detaching attachments by giving a NULL parent from lua. Untested but it should work s b12d6b7 Make sure parent gets set to NULL in the content_cao if the ID is 0 s 9d2413c Don't send object position from the server to clients if the object is attached, as client-side attachments will override that. Also update comments and make them much more clear s 3091174 Make sure m_parent and m_attachment_parent are initialized as NULL and fix other issues s 3b4452e Correct a code comment pointing out a big issue pick 803e823 Fix remaining issues with the server-side attachments, now they work. Tested with object->player and player->player attachments s 10baf1b Fix some code that got mixed up and update a comment s 6811ed2 Remove test changes I committed by mistake and improve on object attachment handling s 04ffcbe Put another useful link in the comment for client attachments, to help developers who wish to aid in figuring out its implementation s da9be59 Code comments to clarify something with server-side attachments s c2eda40 Add an important piece to the client attachment code. It doesn't work because apparently we don't get the proper ClientActiveObject during our search. Thanks go to thexyz for pointing out this implementation. s 457a344 Remove forgotten test code and re-comment a misinterpreted error (the reason why getting the parent's mesh fails is unknown) s 0bcf029 Something I didn't commit because my text editor didn't save the file properly s f659ba7 Got it! Reason for the segmentation fault was that we were also attaching to the lical player on his client, but local player has his own mesh hidden. Therefore, we were getting a null mesh for a correct ClientActiveObject. This needs to be further fixed so attachments are completely hidden or removed client-side when attached to local player. s 96a1e2d If the attached object is attached to local player, hide it locally apart from no longer attempting to attach it. Other clients were tested and read the mesh fine s 2e25114 Add code to set the parent of our object. Client-side attachments still don't show yet so we have to figure out why s 142f4f6 Move falling to builtin s 1aef204 Remove a useless comment s ac9bd1f Add falling_node to special groups in lua-api.txt s 55db13b Add functions to the default mod of minimal game to support old code s 495dce3 Replace pow() with multiplikation to improve speed s a77fe91 Fix flowing liquid animation direction calculation s 4eda8e8 Don't leak textures all over the place s c85b36d Make air and ignore drop nothing s b0ee85b Add liquid_renewable property. s fac8912 Attempt to complete the client attachment code, which should work now (according to the Irrlicht people). However, it doesn't yet. s 019d210 Move closer to getting attachments working and fix some issues. A debug print confirms attachment position is set correctly, but the object still displays at origin 0,0,0 for an unknown reason s ec72fca Get attachment position to be copied properly at least at attachment time, and update attachments when visuals are also updated (what was causing the 0,0,0 origin) pick eef630e Enable client-side attachments. Yep... for the first time, they now work :) s 878f743 Attempt to attach at the proper origin, and account the position and rotation offsets specified by lua. Although the object is attached the origin is somehow bad, and we still don't get to see it working s cf04765 Properly apply position and rotation offset, and update code comments to reflect the last known issues s e85df38 Don't call some functions two times for no reason s efc198f Add detachment code. Is also triggered for all client objects which are not attached when they are spawned, but does not change their functionality s 3d107cb A better and more correct system for sending animation and attachment data from the server to clients pick ec8a8fe Send animations, bone overrides and attachments in entity initialization. Clients no longer have to be near an object when an animation or attachment is set to see the changes, and newly connected clients (or a client that simply renders the object for the first time) will get all of those settings. Therefore, the lua script no longer needs to run every X seconds either, just once per entity. s a7f3b61 Finish fixing the material color code. But it won't work until MineTest has dynamic lighting... another day another feature. s 7935476 Extra checks for the bone positioning / rotation code s 3fc2e93 Many checks and consistency improvements to the client attachment code s 47c4c73 Make a separate function for checking if a client object is attached. A more in-depth change will be needed here to fix reading of invalid pointers s cb85326 Use a different method of fetching the parent. Fixes the mass segmentation faults when rendering an attachment (some still happen though) s 3aec7be Major change to how attachments are handled. Fix the last segmentaton fault, which was due to the parent becoming invalid while being refreshed / removed which would bause the child to remain attached to nothing. Parents remove their children when being deleted themselves and add them back when re-added. Attachments are stored inside a 2D a vector which easily allows both a child to find their parent and a parent to find its children. s 8df05e6 Remove attachment list entry when an object is being permanently removed. Also avoid duplicate entries in this list when re-attaching the same object s 5dcda44 The "big code comments" can now go away. Client attachments almost work properly, and I know what else needs to be done pick 1c65e43 Update attachments at the ending of the addToScene function for parents. And with this... *drum roll* Client-side attachments are at last functional and stick visibly. s 7aae524 Organize today's code a bit better s 41d3d12 Fix the last segmentation fault (apparently). So far attachments seem to be fully functional, although removing the parent causes children to go to origin 0,0,0 and possibly still cause such a fault (though this should already be addressed) s 5ac76c8 Fix a bug in falling code where entities get stuck s 33cab50 Formspec: Draw images before inventories. Allows to use image as background. s 6738c3a Also check if the parent has been removed server-side, and detach the child if so. Fixes children going to origin 0,0,0 when their parent is removed. s 3c966ec Improve on the last commit s 2b96436 Unset all attachment properties when permanently detaching (on both the client and server). Also store less data we don't need s 1385678 Revert something stupid I did in the last commit s 7ac13fd Create a separate function for detaching, and also update lua api documentation s 0454b3b When a child is detached, update its position from the server to clients. This WILL cause it to get positioned slightly differently client side, as the server attachment system only copies parent origin and knows not about mesh / bone transformation. This prevents different clients seeing the object detached in different spots which is most correct s 6df3c05 Update the position of attached players to clients. An attached player will see himself move, but this is currently VERY ugly and laggy as it is done by the server (it probably must stay this way too) s 4c120ab Use a different approach for locally attached players. This allows for smooth positio transitions to work, as well at the player turning around freely. Still buggy however s 4609f98 Add some code I foolishly forgot to the last commit. Attached players are almost working well... with the exception that they go to origin 0,0,0 when detached, for an unknown reason so far pick dfd7498 Fix more things I forgot for attached players. Such players will now properly see themselves moving when attached, and the server will read their position accordingly s 86ce67e Fix attached players being able to bob their view and generate foostep sounds by pressing a movement key (running in place) s 559800b Fix unnecessary network protocol incompatibility in ContentFeatures s b1fa387 Added video settings filter options via config file - second try :-) s 200983b added GUI checkboxes in Settings tab for the aforementioned video settings. s c76f266 Swap out pixel-perfect nyan cat by request of Chris Torres pick eee2f93 Allow Vanessa's texture filtering / mipmap patch to work on models, as well as all other node types s 8ed703b Initialize m_bone_posrot too s 3a59257 Update pos_translator for attached players, which should fix a bug noticed with carts where a detached player would travel from the detachment spot to where it was detached s d3bbb6e Remove an unneeded check s f1952ea An addition to my previous fix s 62d73a2 Don't make attachments possible to right-click either s fcabe9c Properly apply object and text visibility for local attachments, and fix them showing when they shouldn't pick 39815c5 No longer hide players who are dead. With models, a death animation should be used instead s e52f190 Some changes requested by celeron55 s a40e9e2 Rename a lot of things in the code, and use better lua api function names s 015690b Minor code corrections s 2d5584d Add jordan4ibanez' better digging animation s 2a3a84e Adding background to Formspec s 0762653 Bump protocol version up, since the models / animations / attachments code creates new client<->server messages s ada2282 Fix server crash on /clearpassword pick f0d374d RealBadAngel's patch which allows the lua api to read pressed player keys. This should make it possible to change the player's animation based on what he is doing s a1f9c9c Correct lua api version number s ad7ae89 Always update animations and attachments after the entity is added to scene client side. Fixes animations not being applied in client initialization for some reason. Attachments should be re-tested now just to be safe. s 0fea4c1 Fix a segmentation fault caused by reaching materials that didn't exist in a loop for setting texture s 79ad66d A correction to my last change s 48fd66b Allow transparent image_buttons s 8d4877e Fix trees growing into any type of node pick d06ea10 Revert "Don't leak textures all over the place" # Rebase 25cf375..d06ea10 onto 25cf375 # # Commands: # p, pick = use commit # r, reword = use commit, but edit the commit message # e, edit = use commit, but stop for amending # s, squash = use commit, but meld into previous commit # f, fixup = like "squash", but discard this commit's log message # x, exec = run command (the rest of the line) using shell # # These lines can be re-ordered; they are executed from top to bottom. # # If you remove a line here THAT COMMIT WILL BE LOST. # However, if you remove everything, the rebase will be aborted. # # Note that empty commits are commented out