/// <summary>
 ///   Called to queue a change to a prim
 ///   to use in place of old taint mechanism so changes do have a time sequence
 /// </summary>
 public void AddChange(AuroraODECharacter character, changes what, Object arg)
 {
     AODEchangeitem item = new AODEchangeitem {character = character, what = what, arg = arg};
     ChangesQueue.Enqueue(item);
 }
 public void RemoveCharacter(AuroraODECharacter chr)
 {
     lock (_characters)
     {
         _characters.Remove(chr);
     }
 }
 public void BadCharacter(AuroraODECharacter chr)
 {
     lock (_badCharacter)
     {
         if (!_badCharacter.Contains(chr))
             _badCharacter.Add(chr);
     }
 }
        public override PhysicsCharacter AddAvatar(string avName, Vector3 position, Quaternion rotation, Vector3 size,
                                                   bool isFlying, uint localID, UUID UUID)
        {
            Vector3 pos;
            pos.X = position.X;
            pos.Y = position.Y;
            pos.Z = position.Z;
            AuroraODECharacter newAv = new AuroraODECharacter(avName, this, pos, rotation, size)
                                           {
                                               LocalID = localID,
                                               UUID = UUID,
                                               Flying = isFlying,
                                               MinimumGroundFlightOffset = minimumGroundFlightOffset
                                           };

            return newAv;
        }
 public void AddCharacter(AuroraODECharacter chr)
 {
     lock (_characters)
     {
         if (!_characters.Contains(chr))
         {
             if (!chr.bad)
                 _characters.Add(chr);
             else
                 MainConsole.Instance.DebugFormat("[PHYSICS] Did not add BAD actor {0} to characters list", chr.m_uuid);
         }
     }
 }
示例#6
0
 internal void BadCharacter(AuroraODECharacter chr)
 {
     RemoveAvatar(chr);
     AddAvatar(chr.Name, new Vector3(m_region.RegionSizeX/2,
                                     m_region.RegionSizeY/2,
                                     m_region.RegionSizeZ/2), chr.Orientation,
               new Vector3(chr.CAPSULE_RADIUS*2, chr.CAPSULE_RADIUS*2,
                           chr.CAPSULE_LENGTH*2), true, chr.LocalID, chr.UUID);
 }
示例#7
0
 /// <summary>
 ///     Removes a character from the list of avatars currently in the scene
 ///     Internally locked, as it is called only in the Simulation Changes loop
 /// </summary>
 /// <param name="chr"></param>
 internal void RemoveCharacter(AuroraODECharacter chr)
 {
     _characters.Remove(chr);
 }
示例#8
0
 /// <summary>
 ///     Adds a character to the list of avatars in the scene
 ///     Internally locked, as it is called only in the Simulation Changes loop
 /// </summary>
 /// <param name="chr"></param>
 internal void AddCharacter(AuroraODECharacter chr)
 {
     if (!_characters.Contains(chr))
         _characters.Add(chr);
 }
示例#9
0
        public override PhysicsActor AddAvatar(string avName, Vector3 position, Quaternion rotation, Vector3 size, bool isFlying)
        {
            Vector3 pos;
            pos.X = position.X;
            pos.Y = position.Y;
            pos.Z = position.Z;
            AuroraODECharacter newAv = new AuroraODECharacter(avName, this, pos, rotation, size);
            newAv.Flying = isFlying;
            newAv.MinimumGroundFlightOffset = minimumGroundFlightOffset;

            return newAv;
        }
示例#10
0
        private void collision_accounting_events(PhysicsActor p1, PhysicsActor p2, ContactPoint contact)
        {
            obj2LocalID = 0;
            if (!p2.SubscribedEvents() && !p1.SubscribedEvents())
                return;

            switch ((ActorTypes)p2.PhysicsActorType)
            {
                case ActorTypes.Agent:
                    cc2 = (AuroraODECharacter)p2;

                    switch ((ActorTypes)p1.PhysicsActorType)
                    {
                        case ActorTypes.Agent:
                            cc1 = (AuroraODECharacter)p1;
                            obj2LocalID = cc1.m_localID;
                            cc1.AddCollisionEvent(cc2.m_localID, contact);
                            break;
                        case ActorTypes.Prim:
                            if (p1 is AuroraODEPrim)
                            {
                                cp1 = (AuroraODEPrim)p1;
                                obj2LocalID = cp1.m_localID;
                                cp1.AddCollisionEvent(cc2.m_localID, contact);
                            }
                            break;

                        case ActorTypes.Ground:
                        case ActorTypes.Unknown:
                            obj2LocalID = 0;
                            break;
                    }

                    cc2.AddCollisionEvent(obj2LocalID, contact);
                    break;
                case ActorTypes.Prim:

                    if (p2 is AuroraODEPrim)
                    {
                        cp2 = (AuroraODEPrim)p2;

                        switch ((ActorTypes)p1.PhysicsActorType)
                        {
                            case ActorTypes.Agent:
                                if (p1 is AuroraODECharacter)
                                {
                                    cc1 = (AuroraODECharacter)p1;
                                    obj2LocalID = cc1.m_localID;
                                    cc1.AddCollisionEvent(cp2.m_localID, contact);
                                }
                                break;
                            case ActorTypes.Prim:

                                if (p1 is AuroraODEPrim)
                                {
                                    cp1 = (AuroraODEPrim)p1;
                                    obj2LocalID = cp1.m_localID;
                                    cp1.AddCollisionEvent(cp2.m_localID, contact);
                                }
                                break;

                            case ActorTypes.Ground:
                            case ActorTypes.Unknown:
                                obj2LocalID = 0;
                                break;
                        }

                        cp2.AddCollisionEvent(obj2LocalID, contact);
                    }
                    break;
            }
        }
示例#11
0
        public override PhysicsActor AddAvatar(string avName, Vector3 position, Vector3 size, bool isFlying)
        {
            Vector3 pos;
            pos.X = position.X;
            pos.Y = position.Y;
            pos.Z = position.Z;
            AuroraODECharacter newAv = new AuroraODECharacter(avName, this, pos, ode, size, avPIDD, avPIDP, avCapRadius, avStandupTensor, avDensity, avHeightFudgeFactor, avMovementDivisorWalk, avMovementDivisorRun);
            newAv.Flying = isFlying;
            newAv.MinimumGroundFlightOffset = minimumGroundFlightOffset;

            return newAv;
        }
示例#12
0
 /// <summary>
 /// Called to queue a change to a prim
 /// to use in place of old taint mechanism so changes do have a time sequence
 /// </summary>
 public void AddChange(AuroraODECharacter character, changes what, Object arg)
 {
     AODEchangeitem item = new AODEchangeitem();
     item.character = character;
     item.what = what;
     item.arg = arg;
     ChangesQueue.Enqueue(item);
 }