Exemplo n.º 1
0
        public void SetPosition(Vector3 pos)
        {
            m_position = pos;

            //See if has gone out of segment and if so look for new segment
            if (!InSegment())
            {
                int old_segnum = m_segnum;
                m_segnum = level.FindSegmentForPoint(position);
                if (m_segnum == -1)
                {
                    level.editor.AddOutputText("Entity " + num + " not in segment");
                }
                else
                {
                    level.editor.AddOutputText("Entity " + num + " moved from segment " + old_segnum + " to " + m_segnum);
                }
            }
        }