OpenMetaverse.ObjectManager.ObjectPhysicsPropertiesHandler C# (CSharp) Method

ObjectPhysicsPropertiesHandler() protected method

protected ObjectPhysicsPropertiesHandler ( string capsKey, IMessage message, Simulator simulator ) : void
capsKey string
message IMessage
simulator Simulator
return void
        protected void ObjectPhysicsPropertiesHandler(string capsKey, IMessage message, Simulator simulator)
        {
            ObjectPhysicsPropertiesMessage msg = (ObjectPhysicsPropertiesMessage)message;

            if (Client.Settings.OBJECT_TRACKING)
            {
                for (int i = 0; i < msg.ObjectPhysicsProperties.Length; i++)
                {
                    lock (simulator.ObjectsPrimitives.Dictionary)
                    {
                        if (simulator.ObjectsPrimitives.Dictionary.ContainsKey(msg.ObjectPhysicsProperties[i].LocalID))
                        {
                            simulator.ObjectsPrimitives.Dictionary[msg.ObjectPhysicsProperties[i].LocalID].PhysicsProps = msg.ObjectPhysicsProperties[i];
                        }
                    }
                }
            }

            if (m_PhysicsProperties != null)
            {
                for (int i = 0; i < msg.ObjectPhysicsProperties.Length; i++)
                {
                    OnPhysicsProperties(new PhysicsPropertiesEventArgs(simulator, msg.ObjectPhysicsProperties[i]));
                }
            }
        }