animats Posted September 15, 2018 Share Posted September 15, 2018 (Some detailed questions about specific C++ code deep inside the viewer. If there is a better forum for this, please let me know.) Given an LLViewerObject, how do you get its human-readable name? (Needed for debug messages) How does viewer side parenting in llviewerobject.cpp after the comment "fix object parenting" differ from sim side parenting? Nominally SL doesn't have a full hierarchy (children of children) but this code looks like it supports one. Seated avatars seem to be children of the object they're sitting on, and attachments seem to be the children of avatars. That's a 3-level hierarchy. In llviewerobject.cpp, there are several occurrence of ((LLVOAvatar*)this)->setFootPlane(collision_plane); This is an unchecked downcast of LLViewerObject* to LLVOAvatar*. But LLVOAvatar has multiple inheritance: class LLVOAvatar : public LLAvatarAppearance, public LLViewerObject, public boost::signals2::trackable Downcasting a LLViewerObject to an LLVOAvatar is not legal C++ in this situation. I think. The LLViewerObject and its containing LLVOAVatar object don't start at the same address. The compiler won't catch that. Am I missing something, or is this storing into the wrong place? I think a dynamic cast, which checks, would be neeeded in this situation. Link to comment Share on other sites More sharing options...
animats Posted September 15, 2018 Author Share Posted September 15, 2018 (3) turns out to work OK; I wrote test code. There's a bad cast if the sim sends a message in avatar format to a non-avatar, but that's unlikely. Should use dynamic_cast for safety, but it's not causing actual trouble in operation. Link to comment Share on other sites More sharing options...
Whirly Fizzle Posted September 15, 2018 Share Posted September 15, 2018 You may be better posting these sorts of questions to the OpenSource-Dev mailing listhttp://wiki.secondlife.com/wiki/OpenSource-Dev Link to comment Share on other sites More sharing options...
animats Posted September 22, 2018 Author Share Posted September 22, 2018 On 9/15/2018 at 10:34 AM, Whirly Fizzle said: You may be better posting these sorts of questions to the OpenSource-Dev mailing listhttp://wiki.secondlife.com/wiki/OpenSource-Dev Five years ago, yes. Traffic there is very low now. Zero during September. However, I did post a few things, like how to build successfully on Linux, a question someone asked in August. I have two replies. One is in German, from an autoresponder at a German magazine. The other is a porno spam. 4 Link to comment Share on other sites More sharing options...
Beq Janus Posted September 22, 2018 Share Posted September 22, 2018 Yeah, I'm not sure that's actively maintained. I asked to be added (via the subscriber link) but I have never seen any traffic. Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now