Пример #1
0
        public void Init(PhysicsObj obj, ObjectInfoState state)
        {
            Object         = obj;
            State          = state; // copy constructor?
            Scale          = Object.Scale;
            StepUpHeight   = Object.GetStepUpHeight();
            StepDownHeight = Object.GetStepDownHeight();
            Ethereal       = Object.State.HasFlag(PhysicsState.Ethereal);
            StepDown       = Object.State.HasFlag(PhysicsState.Missile);
            var wobj = Object.WeenieObj;

            if (wobj != null)
            {
                if (wobj.IsImpenetable())
                {
                    State |= ObjectInfoState.IsImpenetrable;
                }
                if (wobj.IsPlayer())
                {
                    State |= ObjectInfoState.IsPlayer;
                }
                if (wobj.IsPK())
                {
                    State |= ObjectInfoState.IsPK;
                }
                if (wobj.IsPKLite())
                {
                    State |= ObjectInfoState.IsPKLite;
                }
            }
        }