Example #1
0
        public override void RemoveAvatar(PhysicsActor actor)
        {
            // m_log.DebugFormat("{0}: RemoveAvatar", LogHeader);

            if (!m_initialized)
            {
                return;
            }

            BSCharacter bsactor = actor as BSCharacter;

            if (bsactor != null)
            {
                try
                {
                    lock (PhysObjects) PhysObjects.Remove(actor.LocalID);
                    // Remove kludge someday
                    lock (m_avatars) m_avatars.Remove(bsactor);
                }
                catch (Exception e)
                {
                    m_log.WarnFormat("{0}: Attempt to remove avatar that is not in physics scene: {1}", LogHeader, e);
                }
                bsactor.Destroy();
                // bsactor.dispose();
            }
        }
Example #2
0
        public override PhysicsActor AddAvatar(uint localID, string avName, Vector3 position, Vector3 size, bool isFlying)
        {
            // m_log.DebugFormat("{0}: AddAvatar: {1}", LogHeader, avName);

            if (!m_initialized)
            {
                return(null);
            }

            BSCharacter actor = new BSCharacter(localID, avName, this, position, size, isFlying);

            lock (PhysObjects) PhysObjects.Add(localID, actor);

            // TODO: Remove kludge someday.
            // We must generate a collision for avatars whether they collide or not.
            // This is required by OpenSim to update avatar animations, etc.
            lock (m_avatars) m_avatars.Add(actor);

            return(actor);
        }
Example #3
0
    public override PhysicsActor AddAvatar(uint localID, string avName, Vector3 position, Vector3 size, bool isFlying)
    {
        // m_log.DebugFormat("{0}: AddAvatar: {1}", LogHeader, avName);

        if (!m_initialized) return null;

        BSCharacter actor = new BSCharacter(localID, avName, this, position, size, isFlying);
        lock (PhysObjects) PhysObjects.Add(localID, actor);

        // TODO: Remove kludge someday.
        // We must generate a collision for avatars whether they collide or not.
        // This is required by OpenSim to update avatar animations, etc.
        lock (m_avatars) m_avatars.Add(actor);

        return actor;
    }