I've been browsing through the metabolt code and I had a question about how to tell if a prim is currently being sat on.
I looked through ChatConsole.cs and saw how the radar detects if an av is sitting. AddAvatar() checks whether the av has a ParentID defined, which means the av is sitting on that prim.
However, I don't see how to do the reverse: take a prim and see if there is any av on it. I suppose one way to do it is to scan all avs in the area and see if any of them has that prim as its ParentID, which would mean that it is indeed being sat on. But I'd like to know if there's a better way to tell from the prim directly that it's being sat on by an av.