Esempio n. 1
0
        public override void OnKilled()
        {
            base.OnKilled();

            Controller = null;
            Camera     = new SpectateRagdollCamera();

            EnableAllCollisions = true;
            EnableDrawing       = true;

            Inventory.Clear();

            Target = null;
        }
Esempio n. 2
0
        protected void UpdateTarget()
        {
            if (Input.Pressed(InputButton.Reload))
            {
                TraceResult trace = Trace.Ray(EyePos, EyePos + EyeRot.Forward * 5000f)
                                    .HitLayer(CollisionLayer.Player)
                                    .Ignore(this)
                                    .Size(10.0f)
                                    .Run();

                Target = trace.Hit ? trace.Entity as DronePawn : null;
            }

            if (Target != null && Target.LifeState != LifeState.Alive)
            {
                Target = null;
            }
        }