Exemple #1
0
        /// <summary>
        /// Set up the actor as a ghost, pulling from the regular scene render
        /// and embedding in our ghost list.
        /// </summary>
        /// <param name="actor"></param>
        /// <param name="urgent"></param>
        /// <param name="currentTime"></param>
        private void AddGhost(GameActor actor, bool urgent, double currentTime)
        {
            if (actor.Invisible
#if MF_GHOST_IGNORED
                || actor.Ignored ||
                actor.Camouflaged
#endif // MF_GHOST_IGNORED
                || actor.Visible)
            {
                Ghost ghost = ScratchGhost();
                ghost.TimeOccluding = currentTime;
                ghost.TimeStart     = currentTime;
                ghost.Actor         = actor;
                ghost.Urgent        = urgent;

                actor.DisableEmitters();

                /// Remove from our renderlist
                renderObj.renderList.Remove(actor.RenderObject);

                ghostList.Add(ghost);
            }
        }