OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
/// <summary>
/// Change prim in response to an add force taint.
/// </summary>
Change prim in response to an add force taint.
Change prim in response to an add force taint .
private void changeAddForce()
        {
            if (!m_isSelected)
            {
                lock (m_forcelist)
                {
                    if (IsPhysical)
                    {
                        Vector3 iforce = Vector3.Zero;
                        int i = 0;
                        try
                        {
                            for (i = 0; i < m_forcelist.Count; i++)
                            {
                                iforce = iforce + (m_forcelist[i] * 100);
                            }
                        }
                        catch (IndexOutOfRangeException)
                        {
                            m_forcelist = new List<Vector3>();
                            m_collisionscore = 0;
                            m_interpenetrationcount = 0;
                            m_taintforce = false;
                            return;
                        }
                        catch (ArgumentOutOfRangeException)
                        {
                            m_forcelist = new List<Vector3>();
                            m_collisionscore = 0;
                            m_interpenetrationcount = 0;
                            m_taintforce = false;
                            return;
                        }
                        d.BodyEnable(Body);
                        d.BodyAddForce(Body, iforce.X, iforce.Y, iforce.Z);
                    }
                    m_forcelist.Clear();
                }
                m_collisionscore = 0;
                m_interpenetrationcount = 0;
            }
            m_taintforce = false;
        }
private void changeAddForce ( ) { if ( ! m_isSelected ) { lock ( m_forcelist ) { if ( IsPhysical ) { Vector3 iforce = Vector3 . Zero ; int i = 0 ; try { for ( i = 0 ; i < m_forcelist . Count ; i ++ ) { iforce = iforce + ( m_forcelist [ i ] * 100 ) ; } } catch ( IndexOutOfRangeException ) { m_forcelist = new List < Vector3 > ( ) ; m_collisionscore = 0 ; m_interpenetrationcount = 0 ; m_taintforce = false ; return ; } catch ( ArgumentOutOfRangeException ) { m_forcelist = new List < Vector3 > ( ) ; m_collisionscore = 0 ; m_interpenetrationcount = 0 ; m_taintforce = false ; return ; } d . BodyEnable ( Body ) ; d . BodyAddForce ( Body , iforce . X , iforce . Y , iforce . Z ) ; } m_forcelist . Clear ( ) ; } m_collisionscore = 0 ; m_interpenetrationcount = 0 ; } m_taintforce = false ; }
Change prim in response to an add force taint.
Change prim in response to an add force taint .
//m_log.Info("[PHYSICS]: dequeing forcelist");